Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Commit 8cc546a

Browse files
committed
Add path option for providing a schema in a step
1 parent 0ab8229 commit 8cc546a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • src/ifcbimtester/bimtester/features/steps

src/ifcbimtester/bimtester/features/steps/ifcdata.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import gettext
2+
import os
23
from behave import step, given
34

45
from ifcdata_methods import assert_schema
@@ -8,6 +9,8 @@
89
@step('The IFC schema "{schema}" must be provided')
910
def step_impl(context, schema):
1011
try:
12+
if context.config.userdata.get('path'):
13+
schema = os.path.join(context.config.userdata.get('path'), schema)
1114
IfcFile.load_schema(schema)
1215
except:
1316
assert False, f"The schema {schema} could not be loaded"

0 commit comments

Comments
 (0)