bimtester: steps, add new test module for spatial structure

This commit is contained in:
Bernd Hahnebach
2020-12-21 15:56:26 +01:00
parent 60dd74c64d
commit de5dc40e63
2 changed files with 10 additions and 7 deletions
@@ -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.'
@@ -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.'