From 9b6d53fe38484d9e6edc9b7142d5db03df423198 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Tue, 7 Dec 2021 15:51:31 +0100 Subject: [PATCH] bimtester: example steps, delete more steps which are implemented already --- .../examples/steps/attributes_eleclasses.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/ifcbimtester/examples/steps/attributes_eleclasses.py b/src/ifcbimtester/examples/steps/attributes_eleclasses.py index 249f55efb6..320d98ce82 100644 --- a/src/ifcbimtester/examples/steps/attributes_eleclasses.py +++ b/src/ifcbimtester/examples/steps/attributes_eleclasses.py @@ -6,25 +6,6 @@ from utils import IfcFile use_step_matcher("re") -@step("all (?P.*) elements have an? (?P.*) attribute") -def step_impl(context, ifc_class, attribute): - elements = IfcFile.get().by_type(ifc_class) - for element in elements: - if not getattr(element, attribute): - assert False - - -@step('all (?P.*) elements have an? (?P.*) matching the pattern "(?P.*)"') -def step_impl(context, ifc_class, attribute, pattern): - import re - - elements = IfcFile.get().by_type(ifc_class) - for element in elements: - value = getattr(element, attribute) - print(f'Checking value "{value}" for {element}') - assert re.search(pattern, value) - - @step('all (?P.*) elements have an? (?P.*) taken from the list in "(?P.*)"') def step_impl(context, ifc_class, attributes, list_file): import csv