FEM: unit tests, use unique dir for each run

This commit is contained in:
Bernd Hahnebach
2020-06-22 05:38:48 +02:00
parent 08e7797730
commit 8f0b3d55e3

View File

@@ -41,7 +41,10 @@ def get_fem_test_home_dir(
def get_fem_test_tmp_dir(
):
temp_dir = join(tempfile.gettempdir(), "FEM_unittests")
from uuid import uuid4
_unique_id = str(uuid4())[-12:]
print(_unique_id)
temp_dir = join(tempfile.gettempdir(), "FEM_unittests", _unique_id)
if not os.path.exists(temp_dir):
os.makedirs(temp_dir)
return(temp_dir)