Fix #2945. Selector should expand enumerated list properties so that you can match any of them.

This commit is contained in:
Dion Moult
2023-04-06 19:21:14 +10:00
parent 884ee5b587
commit 6c5acfc8bb
2 changed files with 5 additions and 1 deletions
@@ -88,6 +88,7 @@ class TestSelector(test.bootstrap.IFC4):
ifcopenshell.api.run("pset.edit_pset", self.file, pset=pset, properties={"Foo": "Bar"})
assert subject.Selector.parse(self.file, ".IfcElement[Foo_Bar.Foo]") == [element]
assert subject.Selector.parse(self.file, ".IfcElement[Foo_Bar.Fox]") == []
assert subject.Selector.parse(self.file, '.IfcElement[r"Foo.*ar"."Fo.*"]') == [element]
def test_selecting_by_string_property(self):
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")