mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Fix bug where migrating length units didn't change properties. Unit utility for checking attribute types now considers select types too
Changing properties is very critical for IFC2X3 georeferencing which is stored in a pset.
This commit is contained in:
@@ -82,3 +82,13 @@ class TestFormatLength(test.bootstrap.IFC4):
|
||||
assert (
|
||||
subject.format_length(25.23, 4, unit_system="imperial", input_unit="inch", output_unit="inch") == '25 1/4"'
|
||||
)
|
||||
|
||||
|
||||
class TestIsAttrType(test.bootstrap.IFC4):
|
||||
def test_run(self):
|
||||
schema = ifcopenshell.schema_by_name("IFC4")
|
||||
declaration = schema.declaration_by_name("IfcPropertySingleValue")
|
||||
nominal_value = declaration.attribute_by_index(2).type_of_attribute()
|
||||
assert subject.is_attr_type(nominal_value, "IfcValue")
|
||||
assert subject.is_attr_type(nominal_value, "IfcLengthMeasure")
|
||||
assert not subject.is_attr_type(nominal_value, "IfcLengthMeasure", include_select_types=False)
|
||||
|
||||
Reference in New Issue
Block a user