mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 03:33:48 +00:00
rules fixture: nornallize headers
- to avoid some diffs on regeneration - some fixtures had problems with the header, so `fail` for them wasn't really testing the intended case, because small issues in the header would make fixture fail regardless
This commit is contained in:
@@ -2,6 +2,7 @@ import itertools
|
||||
import time
|
||||
|
||||
import ifcopenshell
|
||||
from generate import normalize_header
|
||||
|
||||
for pty, ety in itertools.product(("GRILLE", "USERDEFINED"), (None, "Something")):
|
||||
f = ifcopenshell.file(schema="IFC2X3")
|
||||
@@ -12,4 +13,5 @@ for pty, ety in itertools.product(("GRILLE", "USERDEFINED"), (None, "Something")
|
||||
ownerhist = f.createIfcOwnerHistory(pando, appl, ChangeAction="ADDED", CreationDate=int(time.time()))
|
||||
f.createIfcAirTerminalType(ifcopenshell.guid.new(), ownerhist, "My Type", ElementType=ety, PredefinedType=pty)
|
||||
valid = pty != "USERDEFINED" or ety is not None
|
||||
normalize_header(f)
|
||||
f.write(f"{'pass' if valid else 'fail'}-air-terminal-type-{pty}-{ety}-ifc2x3.ifc")
|
||||
|
||||
Reference in New Issue
Block a user