mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-01 01:16:27 +00:00
rules fixtures: check number of expected failures
This commit is contained in:
+17
-17
@@ -4,24 +4,24 @@ import ifcopenshell
|
||||
from generate import normalize_header, pass_if, write_fixture
|
||||
|
||||
latitudes = [
|
||||
(False, (-361, 0, 0)),
|
||||
(False, (-361, 0, 0, 0)),
|
||||
(True, (-360, 0, 0, 0)),
|
||||
(True, (0, 0, 0, 0)),
|
||||
(True, (359, 0, 0, 0)),
|
||||
(False, (360, 0, 0, 0)),
|
||||
(True, (30, 30, 30)),
|
||||
(False, (1000, 1000, 1000)),
|
||||
(False, (0, 0, 1000)),
|
||||
(False, (0, 0, 1000, 0)),
|
||||
(True, (0, 0, 0, 100000)),
|
||||
(True, (1, 1, 1, 1)),
|
||||
(True, (-1, -1, -1, -1)),
|
||||
(False, (-1, -1, 1, 1)),
|
||||
(False, (1, -1, -1, -1)),
|
||||
(False, (-361, 0, 0), 1),
|
||||
(False, (-361, 0, 0, 0), 1),
|
||||
(True, (-360, 0, 0, 0), 1),
|
||||
(True, (0, 0, 0, 0), 1),
|
||||
(True, (359, 0, 0, 0), 1),
|
||||
(False, (360, 0, 0, 0), 1),
|
||||
(True, (30, 30, 30), 1),
|
||||
(False, (1000, 1000, 1000), 3),
|
||||
(False, (0, 0, 1000), 1),
|
||||
(False, (0, 0, 1000, 0), 1),
|
||||
(True, (0, 0, 0, 100000), 1),
|
||||
(True, (1, 1, 1, 1), 1),
|
||||
(True, (-1, -1, -1, -1), 1),
|
||||
(False, (-1, -1, 1, 1), 1),
|
||||
(False, (1, -1, -1, -1), 1),
|
||||
]
|
||||
|
||||
for i, (is_valid, lat) in enumerate(latitudes):
|
||||
for i, (is_valid, lat, errors_if_fail) in enumerate(latitudes):
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
p = f.createIfcPerson(Id="tfk", GivenName="Thomas")
|
||||
o = f.createIfcOrganization(Name="AECgeeks")
|
||||
@@ -47,4 +47,4 @@ for i, (is_valid, lat) in enumerate(latitudes):
|
||||
)
|
||||
f.createIfcRelAggregates(ifcopenshell.guid.new(), ownerhist, None, None, proj, [site])
|
||||
normalize_header(f)
|
||||
write_fixture(f, __file__, pass_if(is_valid), f"site-latitude-{i}-ifc2x3")
|
||||
write_fixture(f, __file__, pass_if(is_valid, errors_if_fail=errors_if_fail), f"site-latitude-{i}-ifc2x3")
|
||||
|
||||
Reference in New Issue
Block a user