From 5089a1224cd5c9784c8054ac540c452ec4d93556 Mon Sep 17 00:00:00 2001 From: alexPatrie Date: Sun, 21 Jan 2024 11:28:40 -0500 Subject: [PATCH] added mkdir --- biosimulators_simularium/tests/run.py | 2 +- biosimulators_simularium/tests/test_simple.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/biosimulators_simularium/tests/run.py b/biosimulators_simularium/tests/run.py index 8e711bf..271db38 100644 --- a/biosimulators_simularium/tests/run.py +++ b/biosimulators_simularium/tests/run.py @@ -14,4 +14,4 @@ if __name__ == '__main__': #mol_output = generate_output(dir_fp=MIN_E_DIR) #mesh = generate_interpolated_mesh(mol_output=mol_output) - test_simple_execute(OUTPUT_DIR, MIN_E_DIR, DOC_NAME, USE_JSON) + test_simple_execute(MIN_E_DIR, DOC_NAME, USE_JSON, output_dir=OUTPUT_DIR) diff --git a/biosimulators_simularium/tests/test_simple.py b/biosimulators_simularium/tests/test_simple.py index e48e9ae..04a018f 100644 --- a/biosimulators_simularium/tests/test_simple.py +++ b/biosimulators_simularium/tests/test_simple.py @@ -19,14 +19,17 @@ def assert_clause(clause: bool) -> int: return 1 +OUTPUT_DIR = 'Biosimulators_simularium/OUTPUT' MIN_E_DIR = 'biosimulators_simularium/tests/fixtures/MinE' CROWDING_DIR = 'biosimulators_simularium/tests/fixtures/crowding' DOC_TEST_NAME = 'simularium' USE_JSON = True -def test_simple_execute(output_dir: str, archive_root=MIN_E_DIR, test_name=DOC_TEST_NAME, json=USE_JSON): +def test_simple_execute(output_dir=OUTPUT_DIR, archive_root=MIN_E_DIR, test_name=DOC_TEST_NAME, json=USE_JSON): archive_root = MIN_E_DIR + if not os.path.exists(OUTPUT_DIR): + os.mkdir(OUTPUT_DIR) execute(working_dir=archive_root, use_json=json, output_dir=output_dir) assert_clause(os.path.exists(os.path.join(archive_root, test_name + '.simularium')))