mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +00:00
Fix failing tests
This commit is contained in:
@@ -62,50 +62,50 @@ if has_occ:
|
|||||||
|
|
||||||
|
|
||||||
SETTING = Literal[
|
SETTING = Literal[
|
||||||
"mesher-linear-deflection",
|
|
||||||
"mesher-angular-deflection",
|
|
||||||
"reorient-shells",
|
|
||||||
"length-unit",
|
|
||||||
"angle-unit",
|
"angle-unit",
|
||||||
"precision",
|
"apply-default-materials",
|
||||||
"dimensionality",
|
|
||||||
"layerset-first",
|
|
||||||
"disable-boolean-result",
|
|
||||||
"no-wire-intersection-check",
|
|
||||||
"no-wire-intersection-tolerance",
|
|
||||||
"precision-factor",
|
|
||||||
"debug-boolean",
|
|
||||||
"boolean-attempt-2d",
|
"boolean-attempt-2d",
|
||||||
"weld-vertices",
|
"building-local-placement",
|
||||||
"use-world-coords",
|
"circle-segments",
|
||||||
"unify-shapes",
|
"context-identifiers",
|
||||||
"use-material-names",
|
|
||||||
"convert-back-units",
|
|
||||||
"context-ids",
|
"context-ids",
|
||||||
"context-types",
|
"context-types",
|
||||||
"context-identifiers",
|
"convert-back-units",
|
||||||
"iterator-output",
|
"debug",
|
||||||
|
"dimensionality",
|
||||||
|
"disable-boolean-result",
|
||||||
"disable-opening-subtractions",
|
"disable-opening-subtractions",
|
||||||
"apply-default-materials",
|
|
||||||
"no-normals",
|
|
||||||
"generate-uvs",
|
|
||||||
"enable-layerset-slicing",
|
|
||||||
"element-hierarchy",
|
|
||||||
"validate",
|
|
||||||
"edge-arrows",
|
"edge-arrows",
|
||||||
"building-local-placement",
|
"element-hierarchy",
|
||||||
"site-local-placement",
|
"enable-layerset-slicing",
|
||||||
"force-space-transparency",
|
"force-space-transparency",
|
||||||
"circle-segments",
|
"function-step-param",
|
||||||
|
"function-step-type",
|
||||||
|
"generate-uvs",
|
||||||
|
"iterator-output",
|
||||||
"keep-bounding-boxes",
|
"keep-bounding-boxes",
|
||||||
"piecewise-step-type",
|
"layerset-first",
|
||||||
"piecewise-step-param",
|
"length-unit",
|
||||||
"use-python-opencascade",
|
"mesher-angular-deflection",
|
||||||
"no-parallel-mapping",
|
"mesher-linear-deflection",
|
||||||
"triangulation-type",
|
|
||||||
"model-rotation",
|
|
||||||
"model-offset",
|
"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",
|
"surface-colour",
|
||||||
|
"triangulation-type",
|
||||||
|
"unify-shapes",
|
||||||
|
"use-material-names",
|
||||||
|
"use-python-opencascade",
|
||||||
|
"use-world-coords",
|
||||||
|
"validate",
|
||||||
|
"weld-vertices",
|
||||||
]
|
]
|
||||||
SERIALIZER_SETTING = Literal[
|
SERIALIZER_SETTING = Literal[
|
||||||
"base-uri",
|
"base-uri",
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import ifcopenshell.api.unit
|
|||||||
|
|
||||||
class TestRemoveUnit(test.bootstrap.IFC4):
|
class TestRemoveUnit(test.bootstrap.IFC4):
|
||||||
def test_remove_a_single_unit(self):
|
def test_remove_a_single_unit(self):
|
||||||
|
self.file.createIfcProject()
|
||||||
unit = self.file.createIfcContextDependentUnit()
|
unit = self.file.createIfcContextDependentUnit()
|
||||||
ifcopenshell.api.unit.remove_unit(self.file, unit=unit)
|
ifcopenshell.api.unit.remove_unit(self.file, unit=unit)
|
||||||
assert len(self.file.by_type("IfcContextDependentUnit")) == 0
|
assert len(self.file.by_type("IfcContextDependentUnit")) == 0
|
||||||
@@ -44,9 +45,10 @@ class TestRemoveUnit(test.bootstrap.IFC4):
|
|||||||
assert assignment.Units == (unit2,)
|
assert assignment.Units == (unit2,)
|
||||||
|
|
||||||
def test_removing_a_unit_deeply(self):
|
def test_removing_a_unit_deeply(self):
|
||||||
|
self.file.createIfcProject()
|
||||||
unit = ifcopenshell.api.unit.add_conversion_based_unit(self.file, name="foot")
|
unit = ifcopenshell.api.unit.add_conversion_based_unit(self.file, name="foot")
|
||||||
ifcopenshell.api.unit.remove_unit(self.file, unit=unit)
|
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):
|
class TestRemoveUnitIFC2X3(test.bootstrap.IFC2X3, TestRemoveUnit):
|
||||||
|
|||||||
Reference in New Issue
Block a user