Skip to content
Snippets Groups Projects
Commit ed4810a0 authored by I. Nüske's avatar I. Nüske
Browse files

Revert "MNT: Added an error for comparison of multi-properties if the property...

Revert "MNT: Added an error for comparison of multi-properties if the property is present several times only in the first argument"

This reverts commit 225e3296.
parent c3b7dfe5
No related branches found
No related tags found
1 merge request!151Draft: refactor compare_entities and enhance test coverage
......@@ -342,17 +342,8 @@ def compare_entities(old_entity: Entity,
# we have not yet compared properties that do not exist in old_entity
for prop in new_entity.properties:
# check how often the property appears in old_entity
num_old_prop = len([0 for p in old_entity.properties
if p.name.lower() == prop.name.lower()])
if num_old_prop == 0:
# property is only present in new_entity - add to diff
if len([0 for p in old_entity.properties if p.name.lower() == prop.name.lower()]) == 0:
newdiff["properties"][prop.name] = {}
if num_old_prop > 1:
# Check whether the property is present multiple times in old_entity
# and raise error - result would be incorrect
raise NotImplementedError(
"Comparison not implemented for multi-properties.")
# compare parents
# ToDo: Compare using filter function, compare inheritance level for RTs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment