From 3f46d54ad92b5d32cc085c0931493c98168c2574 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Tue, 7 Dec 2021 09:38:22 +0100 Subject: [PATCH] bimtester: features, move qset test from example steps to implemented steps --- src/ifcbimtester/bimtester/features/steps/all.py | 3 +++ .../features/steps/attributes_qsets/en.py} | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) rename src/ifcbimtester/{examples/steps/attributes_qsets.py => bimtester/features/steps/attributes_qsets/en.py} (67%) diff --git a/src/ifcbimtester/bimtester/features/steps/all.py b/src/ifcbimtester/bimtester/features/steps/all.py index 6fcb45d576..81a989390b 100644 --- a/src/ifcbimtester/bimtester/features/steps/all.py +++ b/src/ifcbimtester/bimtester/features/steps/all.py @@ -24,3 +24,6 @@ from bimtester.features.steps.aggregation import en use_step_matcher("parse") from bimtester.features.steps.attributes_psets import en, de + +use_step_matcher("parse") +from bimtester.features.steps.attributes_qsets import en diff --git a/src/ifcbimtester/examples/steps/attributes_qsets.py b/src/ifcbimtester/bimtester/features/steps/attributes_qsets/en.py similarity index 67% rename from src/ifcbimtester/examples/steps/attributes_qsets.py rename to src/ifcbimtester/bimtester/features/steps/attributes_qsets/en.py index 85a2f3716c..feee58e8ac 100644 --- a/src/ifcbimtester/examples/steps/attributes_qsets.py +++ b/src/ifcbimtester/bimtester/features/steps/attributes_qsets/en.py @@ -1,11 +1,14 @@ from behave import step -from utils import IfcFile +# from bimtester import util +from bimtester.ifc import IfcStore +from bimtester.lang import _ -@step("all {ifc_class} elements have a {qto_name}.{quantity_name} quantity") +# TODO: use get_psets from ifcopenshell.util.element +@step('All "{ifc_class}" elements have a "{qto_name}.{quantity_name}" quantity') def step_impl(context, ifc_class, qto_name, quantity_name): - elements = IfcFile.get().by_type(ifc_class) + elements = IfcStore.file.by_type(ifc_class) for element in elements: is_successful = False if not element.IsDefinedBy: