From 9f503c04dea04f3a61f1677df6ac2333aaf3235c Mon Sep 17 00:00:00 2001 From: lb584 <lb584@cam.ac.uk> Date: Mon, 22 Jan 2024 17:38:37 +0000 Subject: [PATCH] fixing tests to work with new HTMLRunner --- tests/integration/full/full_test_env_suit.py | 2 +- tests/integration/full/full_test_survey.py | 2 +- tests/integration/partial/integration_test_utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/full/full_test_env_suit.py b/tests/integration/full/full_test_env_suit.py index 10323a8..6196364 100644 --- a/tests/integration/full/full_test_env_suit.py +++ b/tests/integration/full/full_test_env_suit.py @@ -40,7 +40,7 @@ class FullTestEnvSuit(BaseEnvSuitTestSuite.EnvSuitTestSuite): run_dict['Environment']['EWS-Plotting']['Ethiopia']['FilterForCountry'] = "True" run_dict['Environment']['EWS-Plotting']['Kenya']['FilterForCountry'] = "True" - os.makedirs(IntegrationTestUtils.TEST_OUT_PATH) + os.makedirs(IntegrationTestUtils.TEST_OUT_PATH, exist_ok = True) IntegrationTestUtils.TEMP_CONFIG_FILE_NAME = IntegrationTestUtils.TEST_OUT_PATH + "temp_config.json" IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME) diff --git a/tests/integration/full/full_test_survey.py b/tests/integration/full/full_test_survey.py index 9a9f294..157d6cc 100644 --- a/tests/integration/full/full_test_survey.py +++ b/tests/integration/full/full_test_survey.py @@ -35,7 +35,7 @@ class FullTestSurvey(BaseSurveyTestSuite.SurveyTestSuite): run_dict['WorkspacePath'] = IntegrationTestUtils.TEST_OUT_PATH run_dict['Survey']['SkipServerDownload'] = False - os.makedirs(IntegrationTestUtils.TEST_OUT_PATH) + os.makedirs(IntegrationTestUtils.TEST_OUT_PATH, exist_ok = True) IntegrationTestUtils.TEMP_CONFIG_FILE_NAME = IntegrationTestUtils.TEST_OUT_PATH + "temp_config.json" IntegrationTestUtils.write_json_file(run_dict, IntegrationTestUtils.TEMP_CONFIG_FILE_NAME) diff --git a/tests/integration/partial/integration_test_utils.py b/tests/integration/partial/integration_test_utils.py index 916d933..c52a98a 100644 --- a/tests/integration/partial/integration_test_utils.py +++ b/tests/integration/partial/integration_test_utils.py @@ -102,7 +102,7 @@ class IntegrationTestUtils: _test_report_dir = IntegrationTestUtils.TEST_JOB_DIR """ - the HTMLTestRunner will create the directory if it does not exist, we are putting the poutout into the + the HTMLTestRunner will create the directory if it does not exist, we are putting the output into the TEST_OUT_PATH, which is the top-level test directory for this run, not the TEST_JOB_DIR, which is the dir for the pipeline being tested """ -- GitLab