mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Support auto detection of unit type when adding imperial units
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user