mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
bimtester: steps, add new test module for spatial structure
This commit is contained in:
@@ -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.'
|
||||
|
||||
Reference in New Issue
Block a user