diff --git a/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses.py b/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses.py index b3b6b7d236..6a6dda335e 100644 --- a/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses.py +++ b/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses.py @@ -1,9 +1,6 @@ from behave import step -from attributes_eleclasses_methods import all_element_attribs_have_a_value -from attributes_eleclasses_methods import name_has_a_value -from attributes_eleclasses_methods import description_has_a_value -from attributes_eleclasses_methods import no_element_class_ele +import attributes_eleclasses_methods as aem from utils import assert_elements from utils import IfcFile from utils import switch_locale @@ -12,25 +9,38 @@ from utils import switch_locale @step("there are no {ifc_class} elements because {reason}") def step_impl(context, ifc_class, reason): switch_locale(context.localedir, "en") - no_element_class_ele(context, ifc_class, reason) + aem.no_eleclass_because_reason( + context, + ifc_class, + reason + ) @step('all {ifc_class} elements class attributes have a value') def step_impl(context, ifc_class): switch_locale(context.localedir, "en") - all_element_attribs_have_a_value(context, ifc_class) + aem.eleclass_have_class_attributes_with_a_value( + context, + ifc_class + ) @step('all {ifc_class} elements have a name given') def step_impl(context, ifc_class): switch_locale(context.localedir, "en") - name_has_a_value(context, ifc_class) + aem.eleclass_has_name_with_a_value( + context, + ifc_class + ) @step('all {ifc_class} elements have a description given') def step_impl(context, ifc_class): switch_locale(context.localedir, "en") - description_has_a_value(context, ifc_class) + aem.eleclass_has_description_with_a_value( + context, + ifc_class + ) @step('all {ifc_class} elements have a name matching the pattern "{pattern}"') diff --git a/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses_methods.py b/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses_methods.py index 0588bd3d2f..77b69296c6 100644 --- a/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses_methods.py +++ b/src/ifcbimtester/bimtester/features/steps/attributes_eleclasses_methods.py @@ -4,7 +4,9 @@ from utils import assert_elements from utils import IfcFile -def no_element_class_ele(context, ifc_class, reason): +def no_eleclass_because_reason( + context, ifc_class, reason +): context.falseelems = [] context.falseguids = [] @@ -41,7 +43,9 @@ def no_element_class_ele(context, ifc_class, reason): assert False, _("Error in falsecount, something went wrong.") -def all_element_attribs_have_a_value(context, ifc_class): +def eleclass_have_class_attributes_with_a_value( + context, ifc_class +): from ifcopenshell.ifcopenshell_wrapper import schema_by_name # schema = schema_by_name("IFC2X3") @@ -84,7 +88,7 @@ def all_element_attribs_have_a_value(context, ifc_class): ) -def name_has_a_value(context, ifc_class): +def eleclass_has_name_with_a_value(context, ifc_class): context.falseelems = [] context.falseguids = [] @@ -109,7 +113,9 @@ def name_has_a_value(context, ifc_class): ) -def description_has_a_value(context, ifc_class): +def eleclass_has_description_with_a_value( + context, ifc_class +): context.falseelems = [] context.falseguids = [] diff --git a/src/ifcbimtester/bimtester/features/steps/attributes_psets.py b/src/ifcbimtester/bimtester/features/steps/attributes_psets.py index 124c54467a..3c7efd01ee 100644 --- a/src/ifcbimtester/bimtester/features/steps/attributes_psets.py +++ b/src/ifcbimtester/bimtester/features/steps/attributes_psets.py @@ -1,6 +1,6 @@ from behave import step -from attributes_psets_methods import all_eleclass_elements_have_prop_in_pset +import attributes_psets_methods as apm from utils import assert_elements from utils import IfcFile from utils import switch_locale @@ -9,7 +9,12 @@ from utils import switch_locale @step("all {ifc_class} elements have an {aproperty} property in the {pset} pset") def step_impl(context, ifc_class, aproperty, pset): switch_locale(context.localedir, "en") - all_eleclass_elements_have_prop_in_pset(context, ifc_class, aproperty, pset) + apm.eleclass_has_property_in_pset( + context, + ifc_class, + aproperty, + pset + ) # ------------------------------------------------------------------------ diff --git a/src/ifcbimtester/bimtester/features/steps/attributes_psets_methods.py b/src/ifcbimtester/bimtester/features/steps/attributes_psets_methods.py index 61c707b6da..5e5fbfa08e 100644 --- a/src/ifcbimtester/bimtester/features/steps/attributes_psets_methods.py +++ b/src/ifcbimtester/bimtester/features/steps/attributes_psets_methods.py @@ -4,7 +4,9 @@ from utils import assert_elements from utils import IfcFile -def all_eleclass_elements_have_prop_in_pset(context, ifc_class, aproperty, pset): +def eleclass_has_property_in_pset( + context, ifc_class, aproperty, pset +): context.falseelems = [] context.falseguids = []