mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
BIMTester now operates on single feature files, which heavily improves usability
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
import os
|
||||
|
||||
from behave.model import Scenario
|
||||
|
||||
from logfile import create_logfile
|
||||
from logfile import append_logfile
|
||||
from zoom_smart_view import append_zoom_smartview
|
||||
from zoom_smart_view import create_zoom_smartview
|
||||
from bimtester.ifc import IfcStore
|
||||
from bimtester.lang import switch_locale
|
||||
|
||||
|
||||
this_path = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
||||
def before_all(context):
|
||||
|
||||
# get from userdata
|
||||
userdata = context.config.userdata
|
||||
context.localedir = userdata.get("localedir")
|
||||
context.ifcfile = userdata["ifcfile"]
|
||||
context.ifcbasename = os.path.basename(
|
||||
os.path.splitext(context.ifcfile)[0]
|
||||
|
||||
if context.config.lang:
|
||||
switch_locale(userdata.get("localedir"), context.config.lang)
|
||||
|
||||
context.ifc_path = userdata["ifc"]
|
||||
context.ifc_basename = os.path.basename(
|
||||
os.path.splitext(context.ifc_path)[0]
|
||||
)
|
||||
|
||||
# do not break after a failed scenario
|
||||
# https://community.osarch.org/discussion/comment/3328/#Comment_3328
|
||||
continue_after_failed = userdata.getbool(
|
||||
"runner.continue_after_failed_step", True
|
||||
)
|
||||
@@ -37,21 +37,21 @@ def before_all(context):
|
||||
# set up log file
|
||||
context.thelogfile = os.path.join(
|
||||
context.outpath,
|
||||
context.ifcbasename + ".log"
|
||||
context.ifc_basename + ".log"
|
||||
)
|
||||
create_logfile(
|
||||
context.thelogfile,
|
||||
context.ifcbasename,
|
||||
context.ifc_basename,
|
||||
)
|
||||
|
||||
# set up smart view file
|
||||
context.smview_file = os.path.join(
|
||||
context.outpath,
|
||||
context.ifcbasename + ".bcsv"
|
||||
context.ifc_basename + ".bcsv"
|
||||
)
|
||||
create_zoom_smartview(
|
||||
context.smview_file,
|
||||
context.ifcbasename,
|
||||
context.ifc_basename,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user