Skip to content

Commit cd5c12a

Browse files
committed
ironpython syntax
1 parent 843a430 commit cd5c12a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/compas/scene/test_scene_serialisation.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,37 +71,37 @@ def items():
7171
def assert_is_data_equal(obj1, obj2, path=""):
7272

7373
if type(obj1) is not type(obj2):
74-
print(f"Type mismatch: {type(obj1)} != {type(obj2)} for {path}:{obj1} and {path}:{obj2}")
74+
print("Type mismatch: {} != {} for {}:{} and {}:{}".format(type(obj1), type(obj2), path, obj1, path, obj2))
7575
return False
7676

7777
if isinstance(obj1, (list, tuple)):
7878
if len(obj1) != len(obj2):
79-
print(f"Length mismatch: {len(obj1)} != {len(obj2)} for {path} and {path}")
79+
print("Length mismatch: {} != {} for {} and {}".format(len(obj1), len(obj2), path, path))
8080
return False
8181

8282
for i, (item1, item2) in enumerate(zip(obj1, obj2)):
83-
if not assert_is_data_equal(item1, item2, path=f"{path}[{i}]"):
83+
if not assert_is_data_equal(item1, item2, path="{}[{}]".format(path, i)):
8484
return False
8585

8686
return True
8787

8888
elif isinstance(obj1, dict):
8989
if len(obj1) != len(obj2):
90-
print(f"Length mismatch: {len(obj1)} != {len(obj2)} for {path} and {path}")
90+
print("Length mismatch: {} != {} for {} and {}".format(len(obj1), len(obj2), path, path))
9191
return False
9292

9393
for key in obj1:
94-
if not assert_is_data_equal(obj1[key], obj2[key], path=f'{path}["{key}"]'):
94+
if not assert_is_data_equal(obj1[key], obj2[key], path='{}["{}"]'.format(path, key)):
9595
return False
9696

9797
return True
9898

9999
elif isinstance(obj1, Data):
100-
return assert_is_data_equal(obj1.__data__, obj2.__data__, path=f"{path}.__data__")
100+
return assert_is_data_equal(obj1.__data__, obj2.__data__, path="{}.__data__".format(path))
101101

102102
else:
103103
if obj1 != obj2:
104-
print(f"Value mismatch: {obj1} != {obj2} for {path}:{obj1} and {path}:{obj2}")
104+
print("Value mismatch: {} != {} for {}:{} and {}:{}".format(obj1, obj2, path, obj1, path, obj2))
105105
return False
106106
else:
107107
return True

0 commit comments

Comments
 (0)