From a6c37771fc5ab39e0467405f87f53ef79d5c9117 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Thu, 17 Apr 2025 12:05:18 +0500 Subject: [PATCH] typing --- src/ifcpatch/test/test_ConvertLengthUnit.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ifcpatch/test/test_ConvertLengthUnit.py b/src/ifcpatch/test/test_ConvertLengthUnit.py index 7ffc01fa83..85e451110a 100644 --- a/src/ifcpatch/test/test_ConvertLengthUnit.py +++ b/src/ifcpatch/test/test_ConvertLengthUnit.py @@ -18,6 +18,8 @@ import test.bootstrap import ifcopenshell.api +import ifcopenshell.api.root +import ifcopenshell.api.unit import ifcopenshell.util.unit import ifcpatch @@ -25,9 +27,9 @@ import ifcpatch class TestConvertLengthUnit(test.bootstrap.IFC4): # NOTE: conversion itself is covered by `ifcopenshell.util.unit.convert_file_length_units` tests def test_run(self): - project = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcProject") - unit = ifcopenshell.api.run("unit.add_si_unit", self.file, unit_type="LENGTHUNIT", prefix="MILLI") - ifcopenshell.api.run("unit.assign_unit", self.file, units=[unit]) + project = ifcopenshell.api.root.create_entity(self.file, ifc_class="IfcProject") + unit = ifcopenshell.api.unit.add_si_unit(self.file, unit_type="LENGTHUNIT", prefix="MILLI") + ifcopenshell.api.unit.assign_unit(self.file, units=[unit]) output = ifcpatch.execute( {"input": "input.ifc", "file": self.file, "recipe": "ConvertLengthUnit", "arguments": ["METER"]} )