mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Python : Make sure an empty list will be received as empty list
See https://github.com/OPM/ResInsight/issues/8508 Python code linting changes detected by black
This commit is contained in:
parent
ef842e7f27
commit
751bf22a6b
@ -223,6 +223,9 @@ class PdmObjectBase:
|
||||
def __makelist(self, list_string):
|
||||
list_string = list_string.lstrip("[")
|
||||
list_string = list_string.rstrip("]")
|
||||
if not list_string:
|
||||
# Return empty list if empty string. Otherwise, the split function will return ['']
|
||||
return []
|
||||
strings = list_string.split(", ")
|
||||
values = []
|
||||
for string in strings:
|
||||
|
@ -109,6 +109,7 @@ def test_summary_no_unsmry(rips_instance, initialize_test):
|
||||
summary_case = rips_instance.project.import_summary_case(temp_path)
|
||||
assert summary_case is None
|
||||
|
||||
|
||||
def test_summary_set_values(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/flow_diagnostics_test/SIMPLE_SUMMARY2.SMSPEC"
|
||||
summary_case = rips_instance.project.import_summary_case(casePath)
|
||||
|
Loading…
Reference in New Issue
Block a user