mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
11 lines
354 B
Python
11 lines
354 B
Python
|
|
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"
|