MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / getattr_

Function getattr_

src/ifcopenshell-python/test/util/test_attribute.py:25–31  ·  view source on GitHub ↗
(ifc_class: str, attr_name: str)

Source from the content-addressed store, hash-verified

23
24
25def getattr_(ifc_class: str, attr_name: str) -> W.attribute:
26 schema = ifcopenshell.schema_by_name("IFC4")
27 declaration = schema.declaration_by_name(ifc_class).as_entity()
28 assert declaration
29 i = declaration.attribute_index(attr_name)
30 attr = declaration.all_attributes()[i]
31 return attr
32
33
34class TestGetPrimitiveType:

Callers 3

test_runMethod · 0.85
test_runMethod · 0.85
test_runMethod · 0.85

Calls 1

schema_by_nameMethod · 0.80

Tested by

no test coverage detected