mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 00:07:53 +00:00
Test non-rooted classifications in IDS
This commit is contained in:
@@ -697,6 +697,10 @@ class TestClassification:
|
|||||||
classification=system_a,
|
classification=system_a,
|
||||||
is_lightweight=False,
|
is_lightweight=False,
|
||||||
)
|
)
|
||||||
|
material = ifc.createIfcMaterial(Name="Material")
|
||||||
|
ifcopenshell.api.run(
|
||||||
|
"classification.add_reference", ifc, product=material, reference=ref1, classification=system_a
|
||||||
|
)
|
||||||
|
|
||||||
facet = Classification()
|
facet = Classification()
|
||||||
run(
|
run(
|
||||||
@@ -728,6 +732,14 @@ class TestClassification:
|
|||||||
expected=True,
|
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")
|
facet = Classification(system="Foobar")
|
||||||
run("Systems should match exactly 1/5", facet=facet, inst=project, expected=True)
|
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)
|
run("Systems should match exactly 2/5", facet=facet, inst=element0, expected=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user