From e2cfc676d8084b8104f0d0e2f137c69f5f478bb9 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 6 Mar 2020 11:35:05 +1100 Subject: [PATCH] New test to check that no elements exist of a particular type --- src/ifcbimtester/features/steps/steps.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ifcbimtester/features/steps/steps.py b/src/ifcbimtester/features/steps/steps.py index b3b68be5b7..5316f91285 100644 --- a/src/ifcbimtester/features/steps/steps.py +++ b/src/ifcbimtester/features/steps/steps.py @@ -66,6 +66,11 @@ def step_impl(context, ifc_class): assert len(IfcFile.get().by_type(ifc_class)) >= 1 +@then(u'there are no {ifc_class} elements because {reason}') +def step_impl(context, ifc_class, reason): + assert len(IfcFile.get().by_type(ifc_class)) == 0 + + @then('all {ifc_class} elements have a name matching the pattern "{pattern}"') def step_impl(context, ifc_class, pattern): import re