mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Fallback for queries if no elements filter is provided #5901
This commit is contained in:
@@ -159,6 +159,14 @@ class TestFilterElements(test.bootstrap.IFC4):
|
||||
assert subject.filter_elements(self.file, "IfcWall") == {element}
|
||||
assert subject.filter_elements(self.file, "IfcElement, ! IfcWall") == {element2}
|
||||
|
||||
def test_select_without_elements_token(self):
|
||||
element = ifcopenshell.api.root.create_entity(self.file, ifc_class="IfcWall")
|
||||
element.Name = "Foo"
|
||||
element2 = ifcopenshell.api.root.create_entity(self.file, ifc_class="IfcWall")
|
||||
element2.Name = "Bar"
|
||||
ifcopenshell.api.root.create_entity(self.file, ifc_class="IfcSlab")
|
||||
assert subject.filter_elements(self.file, "Name=Foo") == {element}
|
||||
|
||||
def test_selecting_by_attribute(self):
|
||||
element = ifcopenshell.api.root.create_entity(self.file, ifc_class="IfcWall")
|
||||
element.Name = "Foo"
|
||||
|
||||
Reference in New Issue
Block a user