See #3581. Fix failing IOS tests.

This commit is contained in:
Dion Moult
2023-08-24 22:12:30 +10:00
parent d4e2d3d2dd
commit b708100c03
4 changed files with 3 additions and 4 deletions
@@ -50,9 +50,7 @@ class Usecase:
for rel in self.settings["information"].IsPointer or []:
for information in rel.RelatedDocuments:
ifcopenshell.api.run("document.remove_information", self.file, information=information)
self.file.remove(rel)
# remove IfcDocumentInformationRelationship so it won't become invalid
for rel in self.settings["information"].IsPointedTo or []:
if rel.RelatedDocuments == (self.settings["information"],):
self.file.remove(rel)
@@ -54,7 +54,6 @@ class TestRemoveInformation(test.bootstrap.IFC4):
project = self.file.createIfcProject()
information = ifcopenshell.api.run("document.add_information", self.file, parent=None)
information2 = ifcopenshell.api.run("document.add_information", self.file, parent=information)
ifcopenshell.api.run("document.add_reference", self.file, information=information)
ifcopenshell.api.run("document.add_reference", self.file, information=information2)
ifcopenshell.api.run("document.remove_information", self.file, information=information)
assert len(self.file.by_type("IfcDocumentInformation")) == 0
@@ -18,6 +18,7 @@
import test.bootstrap
import ifcopenshell.api
import ifcopenshell.util.constraint
class TestCalculateResourceWork(test.bootstrap.IFC4):
@@ -46,5 +46,6 @@ class TestPsetQto:
names = self.pset_qto.get_applicable_names("IfcWall")
assert "Pset_WallCommon" in names
names = self.pset_qto.get_applicable_names("IfcWallType")
assert len(names) == 5
assert len(names) == 6
assert "Pset_WallCommon" in names
assert "Qto_WallBaseQuantities" in names # Backported fix for IFC4