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.'