mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
typing
This commit is contained in:
@@ -31,7 +31,8 @@ class TestValidateGroupTypes:
|
||||
ifcsystem_classes = set()
|
||||
for schema_name in get_args(ifcopenshell.util.schema.IFC_SCHEMA):
|
||||
schema = ifcopenshell.schema_by_name(schema_name)
|
||||
declaration = schema.declaration_by_name("IfcSystem")
|
||||
declaration = schema.declaration_by_name("IfcSystem").as_entity()
|
||||
assert declaration
|
||||
declarations = ifcopenshell.util.schema.get_subtypes(declaration)
|
||||
ifcsystem_classes.update(d.name() for d in declarations)
|
||||
|
||||
|
||||
@@ -227,7 +227,8 @@ class TestFormatLength(test.bootstrap.IFC4):
|
||||
class TestIsAttrType(test.bootstrap.IFC4):
|
||||
def test_run(self):
|
||||
schema = ifcopenshell.schema_by_name("IFC4")
|
||||
declaration = schema.declaration_by_name("IfcPropertySingleValue")
|
||||
declaration = schema.declaration_by_name("IfcPropertySingleValue").as_entity()
|
||||
assert declaration
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user