Support auto detection of unit type when adding imperial units

This commit is contained in:
Dion Moult
2021-10-14 12:44:13 +11:00
parent 464b0c2ebc
commit 1fa1a9e3d3
8 changed files with 216 additions and 0 deletions
@@ -0,0 +1,12 @@
import test.bootstrap
import ifcopenshell.api
class TestEditDerivedUnit(test.bootstrap.IFC4):
def test_run(self):
unit = self.file.createIfcDerivedUnit()
ifcopenshell.api.run("unit.edit_derived_unit", self.file, unit=unit, attributes={
"UnitType": "USERDEFINED", "UserDefinedType": "UserDefinedType"
})
assert unit.UnitType == "USERDEFINED"
assert unit.UserDefinedType == "UserDefinedType"