diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_26.py b/src/ifcopenshell-python/test/fixtures/rules/generate_26.py new file mode 100644 index 0000000000..bcfe7f4055 --- /dev/null +++ b/src/ifcopenshell-python/test/fixtures/rules/generate_26.py @@ -0,0 +1,18 @@ +import ifcopenshell + +cases = ( + ("pass", "label-values", ("test1", "test2")), + ("pass", "nil-values", None), + ("fail", "distinct-value-types", ("test1", 2)), +) + +for result, name, values in cases: + ifc_file = ifcopenshell.file(schema="IFC4X3") + list_values = None + if values is not None: + list_values = [ + ifc_file.create_entity("IfcInteger", v) if isinstance(v, int) else ifc_file.create_entity("IfcLabel", v) + for v in values + ] + ifc_file.create_entity("IfcPropertyListValue", Name="Test", ListValues=list_values) + ifc_file.write(f"{result}-property-list-value-{name}.ifc") diff --git a/src/ifcopenshell-python/test/fixtures/rules/generate_27.py b/src/ifcopenshell-python/test/fixtures/rules/generate_27.py new file mode 100644 index 0000000000..40096d5cca --- /dev/null +++ b/src/ifcopenshell-python/test/fixtures/rules/generate_27.py @@ -0,0 +1,8 @@ +import ifcopenshell + +ifc_file = ifcopenshell.file(schema="IFC2X3") +ifc_file.create_entity( + "IfcCurveStyle", + CurveWidth=ifc_file.create_entity("IfcDescriptiveMeasure", "by layer"), +) +ifc_file.write("pass-IfcCurveStyle-ifc2x3.ifc")