Files
IfcOpenShell/src/ifcopenshell-python/test/api/unit/test_edit_derived_unit.py
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
485 B
Python
Raw Normal View History

import test.bootstrap
import ifcopenshell.api
class TestEditDerivedUnit(test.bootstrap.IFC4):
def test_run(self):
unit = self.file.createIfcDerivedUnit()
2022-01-10 15:42:24 +11:00
ifcopenshell.api.run(
"unit.edit_derived_unit",
self.file,
unit=unit,
attributes={"UnitType": "USERDEFINED", "UserDefinedType": "UserDefinedType"},
)
assert unit.UnitType == "USERDEFINED"
assert unit.UserDefinedType == "UserDefinedType"