Skip to content
Snippets Groups Projects
Commit 4ebec82b authored by florian's avatar florian
Browse files

STY: autopep8'd

parent 37bb9562
Branches
Tags
2 merge requests!107ENH: add entity getters and cached functions,!103Improving the compare_entities functions
Pipeline #36807 passed
......@@ -347,7 +347,6 @@ def compare_entities(old_entity: Entity, new_entity: Entity,
newdiff["properties"].pop(prop.name)
olddiff["properties"].pop(prop.name)
# Check whether there are missing properties in old_entity, additionally
# check for multi-properties that are currently not supported:
for prop in new_entity.properties:
......
......@@ -109,7 +109,8 @@ def test_compare_entities():
r1.add_property("tester", value=3)
r2.add_property("tester", ) # a property where r2 has no value
r1.add_property("tests_234234", value=45)
r2.add_property("tests_TT", value=45) # one additional property that the other one does not have for both
# one additional property that the other one does not have for both
r2.add_property("tests_TT", value=45)
diff_r1, diff_r2 = compare_entities(r1, r2)
......@@ -134,6 +135,7 @@ def test_compare_entities():
assert diff_r1["properties"]["tests"]["value"] == 3
assert diff_r2["properties"]["tests"]["value"] == 45
def test_compare_equality():
r1 = db.Record()
r2 = db.Record()
......@@ -241,6 +243,7 @@ def test_compare_special_properties():
assert len(diff_r1["properties"]) == 0
assert len(diff_r2["properties"]) == 0
def test_compare_importances():
r1 = db.Record()
r2 = db.Record()
......@@ -262,6 +265,7 @@ def test_compare_properties():
with pytest.raises(NotImplementedError, match=".*abstract properties.*"):
compare_entities(p1, p2)
def test_multi_properties():
# This test is rather lengthy, because:
# - previously the check for multi-properties was only implemented for the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment