mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 06:00:51 +00:00
rules fixtures: append comment indicating fixture origin
This commit is contained in:
+10
-10
@@ -1,5 +1,5 @@
|
||||
import ifcopenshell
|
||||
from generate import normalize_header
|
||||
from generate import normalize_header, write_fixture
|
||||
|
||||
coords = [(0.0, 0.0), (10.0, 0.0), (10.0, 10.0), (0.0, 10.0)]
|
||||
make_3d = lambda cs: [c + (0.0,) for c in cs]
|
||||
@@ -12,7 +12,7 @@ map = lambda fn, *args: list(old_map(fn, *args))
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
f.createIfcAxis2Placement3D(f.createIfcCartesianPoint((0.0, 0.0, 0.0)))
|
||||
normalize_header(f)
|
||||
f.write(f"pass-axis2-3d-pos-ifc2x3.ifc")
|
||||
write_fixture(f, __file__, "pass", "axis2-3d-pos-ifc2x3")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
f.createIfcAxis2Placement3D(
|
||||
@@ -21,7 +21,7 @@ f.createIfcAxis2Placement3D(
|
||||
f.createIfcDirection((1.0, 0.0, 0.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"pass-axis2-two-directions-ifc2x3.ifc")
|
||||
write_fixture(f, __file__, "pass", "axis2-two-directions-ifc2x3")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
f.createIfcAxis2Placement3D(
|
||||
@@ -30,7 +30,7 @@ f.createIfcAxis2Placement3D(
|
||||
RefDirection=None,
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-only-axis-ifc2x3.ifc")
|
||||
write_fixture(f, __file__, "fail", "axis2-only-axis-ifc2x3")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
f.createIfcAxis2Placement3D(
|
||||
@@ -39,7 +39,7 @@ f.createIfcAxis2Placement3D(
|
||||
RefDirection=f.createIfcDirection((1.0, 0.0, 0.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-only-ref-ifc2x3.ifc")
|
||||
write_fixture(f, __file__, "fail", "axis2-only-ref-ifc2x3")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
f.createIfcAxis2Placement3D(
|
||||
@@ -48,14 +48,14 @@ f.createIfcAxis2Placement3D(
|
||||
f.createIfcDirection((0.0, 1.0, 0.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-2d-axis-ifc2x3.ifc")
|
||||
write_fixture(f, __file__, "fail", "axis2-2d-axis-ifc2x3")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
f.createIfcAxis2Placement3D(
|
||||
f.createIfcCartesianPoint((0.0, 0.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-2d-pos-ifc2x3.ifc")
|
||||
write_fixture(f, __file__, "fail", "axis2-2d-pos-ifc2x3")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
f.createIfcAxis2Placement3D(
|
||||
@@ -64,7 +64,7 @@ f.createIfcAxis2Placement3D(
|
||||
f.createIfcDirection((1.0, 0.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-2d-ref-ifc2x3.ifc")
|
||||
write_fixture(f, __file__, "fail", "axis2-2d-ref-ifc2x3")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
f.createIfcAxis2Placement3D(
|
||||
@@ -73,7 +73,7 @@ f.createIfcAxis2Placement3D(
|
||||
RefDirection=f.createIfcDirection((0.0, 0.0, 1.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-parallel-axes.ifc")
|
||||
write_fixture(f, __file__, "fail", "axis2-parallel-axes")
|
||||
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
f.createIfcAxis2Placement3D(
|
||||
@@ -82,4 +82,4 @@ f.createIfcAxis2Placement3D(
|
||||
RefDirection=f.createIfcDirection((0.0, 0.0, -1.0)),
|
||||
)
|
||||
normalize_header(f)
|
||||
f.write(f"fail-axis2-anti-parallel-axes.ifc")
|
||||
write_fixture(f, __file__, "fail", "axis2-anti-parallel-axes")
|
||||
|
||||
Reference in New Issue
Block a user