mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-18 03:19:53 +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:
@@ -1,6 +1,7 @@
|
||||
import time
|
||||
|
||||
import ifcopenshell
|
||||
from generate import normalize_header
|
||||
|
||||
names = [("Same", "Same"), ("Different", "SomethingElse")]
|
||||
|
||||
@@ -18,5 +19,6 @@ for nms in names:
|
||||
units = f.createIfcUnitAssignment(Units=[f.createIfcSIUnit(None, "LENGTHUNIT", None, "METRE")])
|
||||
ownerhist = f.createIfcOwnerHistory(pando, appl, ChangeAction="ADDED", CreationDate=int(time.time()))
|
||||
f.createIfcPropertySet(ifcopenshell.guid.new(), ownerhist, "MyPset", HasProperties=map(make_prop(f), nms))
|
||||
normalize_header(f)
|
||||
f.write(f"{'pass' if len(set(nms)) == len(nms) else 'fail'}-property-{'-'.join(map(str.lower, nms))}-ifc2x3.ifc")
|
||||
15
|
||||
|
||||
Reference in New Issue
Block a user