Test non-rooted classifications in IDS

This commit is contained in:
Dion Moult
2022-09-03 11:54:12 +10:00
parent 0668eadc36
commit f9019a4007
+12
View File
@@ -697,6 +697,10 @@ class TestClassification:
classification=system_a,
is_lightweight=False,
)
material = ifc.createIfcMaterial(Name="Material")
ifcopenshell.api.run(
"classification.add_reference", ifc, product=material, reference=ref1, classification=system_a
)
facet = Classification()
run(
@@ -728,6 +732,14 @@ class TestClassification:
expected=True,
)
facet = Classification(value="1")
run(
"Non-rooted resources that have external classification references should also pass",
facet=facet,
inst=material,
expected=True,
)
facet = Classification(system="Foobar")
run("Systems should match exactly 1/5", facet=facet, inst=project, expected=True)
run("Systems should match exactly 2/5", facet=facet, inst=element0, expected=False)