mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 19:32:29 +00:00
Add test about deletion
This commit is contained in:
@@ -55,6 +55,18 @@ assert str(prop) == str(prop2).replace(str(prop2.id()), str(prop.id()))
|
|||||||
assert prop2.id() == 1
|
assert prop2.id() == 1
|
||||||
# Adding the same instance returns the previous copy
|
# Adding the same instance returns the previous copy
|
||||||
assert f2.add(prop) == prop2
|
assert f2.add(prop) == prop2
|
||||||
|
f2.remove(f2[1])
|
||||||
|
try:
|
||||||
|
print(prop2)
|
||||||
|
assert False
|
||||||
|
except:
|
||||||
|
assert True
|
||||||
|
try:
|
||||||
|
f2[1]
|
||||||
|
assert False
|
||||||
|
except:
|
||||||
|
assert True
|
||||||
|
|
||||||
|
|
||||||
# A recursively obtained python dictionary representation
|
# A recursively obtained python dictionary representation
|
||||||
# matches for copied instances as well
|
# matches for copied instances as well
|
||||||
|
|||||||
Reference in New Issue
Block a user