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

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

11 lines
354 B
Python
Raw Normal View History

2021-10-04 13:14:38 +11:00
import test.bootstrap
import ifcopenshell.api
class TestAddSIUnit(test.bootstrap.IFC4):
def test_run(self):
unit = ifcopenshell.api.run("unit.add_si_unit", self.file, unit_type="LENGTHUNIT", name="METRE", prefix="MILLI")
assert unit.UnitType == "LENGTHUNIT"
assert unit.Name == "METRE"
assert unit.Prefix == "MILLI"