Skip to content
Snippets Groups Projects
Verified Commit fff09bfe authored by Daniel Hornung's avatar Daniel Hornung
Browse files

TEST: More tests for #111

parent 487a5097
No related branches found
No related tags found
1 merge request!123TEST: xfail for issue 111
Pipeline #44486 failed
......@@ -365,10 +365,15 @@ def test_bug_109():
@pytest.mark.xfail(reason="Issue https://gitlab.com/linkahead/linkahead-pylib/-/issues/111")
def test_failing_merge_entities_111():
prop_a = db.Property()
prop_b = db.Property(name="b", datatype=db.TEXT)
prop_parent = db.Property(name="prop_parent")
prop_b = db.Property(name="b", datatype=db.DOUBLE, unit="µs", value=1.1).add_parent(prop_parent)
print(prop_b)
db.apiutils.merge_entities(prop_a, prop_b)
assert prop_a.name == "b" # OK
assert prop_a.datatype == db.TEXT # fails
assert prop_a.name == prop_b.name # OK
assert prop_parent.name in [par.name for par in prop_a.get_parents()] # OK
assert prop_a.value == prop_b.value # fails
assert prop_a.datatype == db.DOUBLE # fails
assert prop_a.unit == prop_b.unit # fails
def test_wrong_merge_conflict_reference():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment