Fix ifcopenshell.file calls in rules fixtures, use simpler schema postfix

This commit is contained in:
Andrej730
2026-08-03 15:16:27 +05:00
parent 6edea83137
commit 8f67b905eb
9 changed files with 11 additions and 10 deletions
@@ -7,12 +7,12 @@ import ifcopenshell.api.root
guid1 = "3pdqyORIn8KBHZAhhtJ72T"
guid2 = "1sEzC8v31DshmvW5t5P631"
for schema in ("ifc2x3", "ifc4", "ifc4x3"):
for schema in ("IFC2X3", "IFC4", "IFC4X3"):
for status in ("fail", "pass"):
f = ifcopenshell.file(schema=schema)
# setup IfcOwnerHistory
if schema == "ifc2x3":
if schema == "IFC2X3":
ifcopenshell.api.owner.add_application(f)
person = ifcopenshell.api.owner.add_person(f)
organization = ifcopenshell.api.owner.add_organisation(f)
@@ -23,5 +23,5 @@ for schema in ("ifc2x3", "ifc4", "ifc4x3"):
wall1.GlobalId = guid1
wall2.GlobalId = guid1 if status == "fail" else guid2
filename = f"{status}-{'not-' if status == 'pass' else ''}duplicated-guids-{schema}.ifc"
filename = f"{status}-{'not-' if status == 'pass' else ''}duplicated-guids-{schema.lower()}.ifc"
f.write(Path(__file__).parent / filename)