diff --git a/src/ifcbimtester/bimtester/features/steps/ifcdata.py b/src/ifcbimtester/bimtester/features/steps/ifcdata.py new file mode 100644 index 0000000000..706051484b --- /dev/null +++ b/src/ifcbimtester/bimtester/features/steps/ifcdata.py @@ -0,0 +1,28 @@ +from behave import step + +from utils import IfcFile + + +@step('The IFC file "{file}" must be provided') +def step_impl(context, file): + try: + IfcFile.load(file) + except: + assert False, f"The file {file} could not be loaded" + + +@step("IFC data must use the {schema} schema") +def step_impl(context, schema): + assert IfcFile.get().schema == schema, "We expected a schema of {} but instead got {}".format( + schema, IfcFile.get().schema + ) + + +@step('The IFC file "{file}" is exempt from being provided') +def step_impl(context, file): + pass + + +@step("No further requirements are specified because {reason}") +def step_impl(context, reason): + pass diff --git a/src/ifcbimtester/bimtester/features/steps/project_setup.py b/src/ifcbimtester/bimtester/features/steps/project_setup.py index 14fc480fa3..9cb8af8732 100644 --- a/src/ifcbimtester/bimtester/features/steps/project_setup.py +++ b/src/ifcbimtester/bimtester/features/steps/project_setup.py @@ -4,31 +4,6 @@ from utils import assert_attribute from utils import IfcFile -@step('The IFC file "{file}" must be provided') -def step_impl(context, file): - try: - IfcFile.load(file) - except: - assert False, f"The file {file} could not be loaded" - - -@step("IFC data must use the {schema} schema") -def step_impl(context, schema): - assert IfcFile.get().schema == schema, "We expected a schema of {} but instead got {}".format( - schema, IfcFile.get().schema - ) - - -@step('The IFC file "{file}" is exempt from being provided') -def step_impl(context, file): - pass - - -@step("No further requirements are specified because {reason}") -def step_impl(context, reason): - pass - - @step("The project must have an identifier of {guid}") def step_impl(context, guid): assert_attribute(IfcFile.get().by_type("IfcProject")[0], "GlobalId", guid)