From de5dc40e63c79d0a6c9357bee100811eab16628b Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Mon, 21 Dec 2020 15:56:26 +0100 Subject: [PATCH] bimtester: steps, add new test module for spatial structure --- .../bimtester/features/steps/spatial_structure.py | 10 ++++++++++ src/ifcbimtester/bimtester/features/steps/steps.py | 7 ------- 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 src/ifcbimtester/bimtester/features/steps/spatial_structure.py diff --git a/src/ifcbimtester/bimtester/features/steps/spatial_structure.py b/src/ifcbimtester/bimtester/features/steps/spatial_structure.py new file mode 100644 index 0000000000..ef96979639 --- /dev/null +++ b/src/ifcbimtester/bimtester/features/steps/spatial_structure.py @@ -0,0 +1,10 @@ +from behave import step + +from utils import IfcFile + + +@step("all buildings have an address") +def step_impl(context): + for building in IfcFile.get().by_type("IfcBuilding"): + if not building.BuildingAddress: + assert False, f'The building "{building.Name}" has no address.' diff --git a/src/ifcbimtester/bimtester/features/steps/steps.py b/src/ifcbimtester/bimtester/features/steps/steps.py index 9990a9ef97..86ee12d80f 100644 --- a/src/ifcbimtester/bimtester/features/steps/steps.py +++ b/src/ifcbimtester/bimtester/features/steps/steps.py @@ -122,10 +122,3 @@ def step_impl(context, ifc_class, attribute_name, attribute_value): if hasattr(element, attribute_name) and getattr(element, attribute_name) == attribute_value: return assert False - - -@step("all buildings have an address") -def step_impl(context): - for building in IfcFile.get().by_type("IfcBuilding"): - if not building.BuildingAddress: - assert False, f'The building "{building.Name}" has no address.'