Skip to content
Snippets Groups Projects
Commit 62cdd301 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

TST: adjust test to new argument names

parent caf2a942
Branches
Tags
2 merge requests!159Release 0.16.o,!154Added the possibility to use custom labels instead of 'old' and 'new'
Pipeline #57459 passed with warnings
...@@ -965,22 +965,22 @@ def test_describe_diff(): ...@@ -965,22 +965,22 @@ def test_describe_diff():
diff = compare_entities(recA, recB) diff = compare_entities(recA, recB)
diffout = describe_diff(*diff) diffout = describe_diff(*diff)
assert diffout.startswith("## Difference between the old version and the new version of None") assert diffout.startswith("## Difference between the first version and the second version of None")
# The output of the describe_diff function is currently not ordered (e.g. by name of the property) # The output of the describe_diff function is currently not ordered (e.g. by name of the property)
# so we cannot just compare a well-defined output string. # so we cannot just compare a well-defined output string.
assert "it does not exist in the old version:" in diffout assert "it does not exist in the first version:" in diffout
assert "old version: {'value': 2}" in diffout assert "first version: {'value': 2}" in diffout
assert "new version: {'value': 12}" in diffout assert "second version: {'value': 12}" in diffout
assert "old version: {'unit': 'K'}" in diffout assert "first version: {'unit': 'K'}" in diffout
assert "new version: {'unit': '°C'}" in diffout assert "second version: {'unit': '°C'}" in diffout
diffout = describe_diff(*diff, name="Entity") diffout = describe_diff(*diff, name="Entity")
assert diffout.startswith("## Difference between the old version and the new version of Entity") assert diffout.startswith("## Difference between the first version and the second version of Entity")
diffout = describe_diff(*diff, label_old="recA", label_new="recB") diffout = describe_diff(*diff, label_e0="recA", label_e1="recB")
assert "recA: {'value': 2}" in diffout assert "recA: {'value': 2}" in diffout
assert "recB: {'value': 12}" in diffout assert "recB: {'value': 12}" in diffout
...@@ -989,5 +989,5 @@ def test_describe_diff(): ...@@ -989,5 +989,5 @@ def test_describe_diff():
assert "it does not exist in the recA:" in diffout assert "it does not exist in the recA:" in diffout
assert "old" not in diffout assert "first" not in diffout
assert "new" not in diffout assert "second" not in diffout
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment