diff --git a/src/ifcopenshell-python/test/util/test_element.py b/src/ifcopenshell-python/test/util/test_element.py index 62cca30d31..6ebba1b82a 100644 --- a/src/ifcopenshell-python/test/util/test_element.py +++ b/src/ifcopenshell-python/test/util/test_element.py @@ -535,6 +535,7 @@ class TestGetElementsByMaterial(test.bootstrap.IFC4): assert subject.get_elements_by_material(self.file, material) == {element} def test_getting_elements_of_a_material_layer_set(self): + self.file.create_entity("IfcProject") # add_layer. element = ifcopenshell.api.root.create_entity(self.file, ifc_class="IfcWall") element_type = ifcopenshell.api.root.create_entity(self.file, ifc_class="IfcWallType") ifcopenshell.api.type.assign_type(self.file, related_objects=[element], relating_type=element_type)