From a54b84b4c318058c489b1d8fcec3268c5de0b905 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Tue, 12 Jan 2021 13:44:11 +0100 Subject: [PATCH] bimtester: run, better variable name --- src/ifcbimtester/bimtester/run.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ifcbimtester/bimtester/run.py b/src/ifcbimtester/bimtester/run.py index 48f6bc931e..301b53b742 100644 --- a/src/ifcbimtester/bimtester/run.py +++ b/src/ifcbimtester/bimtester/run.py @@ -208,19 +208,19 @@ def run_copyintmp_tests(args={}): # set up paths # a unique temp path should not be used # behave raises an ambiguous step exception - # run_path = tempfile.mkdtemp() + # copy_base_path = tempfile.mkdtemp() # thus use the same path on every run # but delete it if exists - run_path = os.path.join(tempfile.gettempdir(), "bimtesterfc") - if os.path.isdir(run_path): + copy_base_path = os.path.join(tempfile.gettempdir(), "bimtesterfc") + if os.path.isdir(copy_base_path): from shutil import rmtree - rmtree(run_path) # fails on read only files - if os.path.isdir(run_path): - print("Delete former beimtester run dir {} failed".format(run_path)) + rmtree(copy_base_path) # fails on read only files + if os.path.isdir(copy_base_path): + print("Delete former beimtester run dir {} failed".format(copy_base_path)) return False - os.mkdir(run_path) - report_path = os.path.join(run_path, "report") - copy_features_path = os.path.join(run_path, "features") + os.mkdir(copy_base_path) + report_path = os.path.join(copy_base_path, "report") + copy_features_path = os.path.join(copy_base_path, "features") # copy features path from bimtester source code srccode_features_path = os.path.join( @@ -320,7 +320,7 @@ def run_copyintmp_tests(args={}): # delete steps # shutil.rmtree(steps_path) - return run_path + return copy_base_path def run_all(the_features_path, the_ifcfile):