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.

13 lines
448 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()
ifcopenshell.api.run("unit.edit_derived_unit", self.file, unit=unit, attributes={
"UnitType": "USERDEFINED", "UserDefinedType": "UserDefinedType"
})
assert unit.UnitType == "USERDEFINED"
assert unit.UserDefinedType == "UserDefinedType"