Fix failing tests

This commit is contained in:
Dion Moult
2025-01-28 10:54:37 +11:00
parent 8e29e7cdee
commit 5300f4c78f
2 changed files with 37 additions and 35 deletions
@@ -62,50 +62,50 @@ if has_occ:
SETTING = Literal[
"mesher-linear-deflection",
"mesher-angular-deflection",
"reorient-shells",
"length-unit",
"angle-unit",
"precision",
"dimensionality",
"layerset-first",
"disable-boolean-result",
"no-wire-intersection-check",
"no-wire-intersection-tolerance",
"precision-factor",
"debug-boolean",
"apply-default-materials",
"boolean-attempt-2d",
"weld-vertices",
"use-world-coords",
"unify-shapes",
"use-material-names",
"convert-back-units",
"building-local-placement",
"circle-segments",
"context-identifiers",
"context-ids",
"context-types",
"context-identifiers",
"iterator-output",
"convert-back-units",
"debug",
"dimensionality",
"disable-boolean-result",
"disable-opening-subtractions",
"apply-default-materials",
"no-normals",
"generate-uvs",
"enable-layerset-slicing",
"element-hierarchy",
"validate",
"edge-arrows",
"building-local-placement",
"site-local-placement",
"element-hierarchy",
"enable-layerset-slicing",
"force-space-transparency",
"circle-segments",
"function-step-param",
"function-step-type",
"generate-uvs",
"iterator-output",
"keep-bounding-boxes",
"piecewise-step-type",
"piecewise-step-param",
"use-python-opencascade",
"no-parallel-mapping",
"triangulation-type",
"model-rotation",
"layerset-first",
"length-unit",
"mesher-angular-deflection",
"mesher-linear-deflection",
"model-offset",
"model-rotation",
"no-normals",
"no-parallel-mapping",
"no-wire-intersection-check",
"no-wire-intersection-tolerance",
"precision",
"precision-factor",
"reorient-shells",
"site-local-placement",
"surface-colour",
"triangulation-type",
"unify-shapes",
"use-material-names",
"use-python-opencascade",
"use-world-coords",
"validate",
"weld-vertices",
]
SERIALIZER_SETTING = Literal[
"base-uri",
@@ -22,6 +22,7 @@ import ifcopenshell.api.unit
class TestRemoveUnit(test.bootstrap.IFC4):
def test_remove_a_single_unit(self):
self.file.createIfcProject()
unit = self.file.createIfcContextDependentUnit()
ifcopenshell.api.unit.remove_unit(self.file, unit=unit)
assert len(self.file.by_type("IfcContextDependentUnit")) == 0
@@ -44,9 +45,10 @@ class TestRemoveUnit(test.bootstrap.IFC4):
assert assignment.Units == (unit2,)
def test_removing_a_unit_deeply(self):
self.file.createIfcProject()
unit = ifcopenshell.api.unit.add_conversion_based_unit(self.file, name="foot")
ifcopenshell.api.unit.remove_unit(self.file, unit=unit)
assert len([e for e in self.file]) == 0
assert len([e for e in self.file]) == 1
class TestRemoveUnitIFC2X3(test.bootstrap.IFC2X3, TestRemoveUnit):