diff --git a/tests/integration/full/full_test_deposition.py b/tests/integration/full/full_test_deposition.py index cb3772eee9c15b3b46a427d3dc88738220dc9d04..71ee3c98375cbd7581c704a444d16e1ee4bbd775 100644 --- a/tests/integration/full/full_test_deposition.py +++ b/tests/integration/full/full_test_deposition.py @@ -18,7 +18,8 @@ class FullTestDeposition(BaseDepoTestSuite.DepoTestSuite): self.set_expected_values() - if IntegrationTestUtils.TEST_OUT_PATH is None \ + path = IntegrationTestUtils.TEST_OUT_PATH + if path is None \ or not os.path.isdir(IntegrationTestUtils.TEST_OUT_PATH): FullTestDeposition.write_temp_run_config_file() FullTestDeposition.run_depo_pipeline() diff --git a/tests/integration/full/full_test_env_suit.py b/tests/integration/full/full_test_env_suit.py index 49181b1ffca3df837404f71a58043c52ca48d2b8..fb5175618bd71890309f982ebb4ffd8926a77ee0 100644 --- a/tests/integration/full/full_test_env_suit.py +++ b/tests/integration/full/full_test_env_suit.py @@ -21,7 +21,7 @@ class FullTestEnvSuit(BaseEnvSuitTestSuite.EnvSuitTestSuite): if IntegrationTestUtils.TEST_OUT_PATH is None or not os.path.isdir( IntegrationTestUtils.TEST_OUT_PATH): FullTestEnvSuit.write_temp_run_config_file() - # FullTestEnvSuit.run_env_pipeline() + FullTestEnvSuit.run_env_pipeline() else: print(f"output in {IntegrationTestUtils.TEST_OUT_PATH} already written, skipping rerun") @@ -50,7 +50,6 @@ class FullTestEnvSuit(BaseEnvSuitTestSuite.EnvSuitTestSuite): IntegrationTestUtils.TEST_START_DATE, IntegrationTestUtils.EMAIL_CRED_PATH) - if __name__ == '__main__': _success: bool = IntegrationTestUtils.run_full_integration_test_pipeline(FullTestEnvSuit, test_prefix = "env", diff --git a/tests/integration/partial/integration_test_utils.py b/tests/integration/partial/integration_test_utils.py index 78f8c6492f76f350489f6b225e9ba13477963132..6faef10738298260391a0660987d70757ded3f11 100644 --- a/tests/integration/partial/integration_test_utils.py +++ b/tests/integration/partial/integration_test_utils.py @@ -59,8 +59,8 @@ class IntegrationTestUtils: IntegrationTestUtils.DEFAULT_CONFIG_FILE_PATH = _config_file nowstring: str = IntegrationTestUtils.get_now_string() - # prefix: str = f"temp_{test_prefix}_" + nowstring - prefix: str = f"temp_{test_prefix}" + prefix: str = f"temp_{test_prefix}_" + nowstring + # prefix: str = f"temp_{test_prefix}" IntegrationTestUtils.TEST_OUT_PATH = _outdir + prefix + os.sep IntegrationTestUtils.EMAIL_CRED_PATH = _email_cred_path @@ -186,7 +186,7 @@ class IntegrationTestUtils: os.environ["EMAIL_CRED"] = email_cred_path import Processor - reload(Processor) + reload(Processor) # reload the class to reset all variables from Processor import run_Process, set_log_level args_dict: dict = {} diff --git a/tests/integration/partial/run_test_suite.py b/tests/integration/partial/run_test_suite.py index ffbc4a6d0ad5c471fcde51222fd254634dc08b60..cded5c89ecee0e75d6717bab4b4bb0296341b5d5 100644 --- a/tests/integration/partial/run_test_suite.py +++ b/tests/integration/partial/run_test_suite.py @@ -15,9 +15,9 @@ from integration.partial.test_advisory import TestAdvisory def build_test_runner() -> TestSuite: tests: TestSuite = TestSuite() tests.addTests(TestLoader().loadTestsFromTestCase(TestDeposition)) - # tests.addTests(TestLoader().loadTestsFromTestCase(TestEnvSuit)) - # tests.addTests(TestLoader().loadTestsFromTestCase(TestSurvey)) - # tests.addTests(TestLoader().loadTestsFromTestCase(TestAdvisory)) + tests.addTests(TestLoader().loadTestsFromTestCase(TestEnvSuit)) + tests.addTests(TestLoader().loadTestsFromTestCase(TestSurvey)) + tests.addTests(TestLoader().loadTestsFromTestCase(TestAdvisory)) return tests diff --git a/tests/integration/partial/test_advisory.py b/tests/integration/partial/test_advisory.py index d79c423ff0efd88e49a0852fb2bccff9a321d69c..9cc1dce3689cec4c3962aec873b48476be8a4285 100644 --- a/tests/integration/partial/test_advisory.py +++ b/tests/integration/partial/test_advisory.py @@ -8,6 +8,14 @@ from integration.test_suites.advisory_test_suite import BaseAdvisoryTestSuite class TestAdvisory(BaseAdvisoryTestSuite.AdvisoryTestSuite): + @classmethod + def setUpClass(cls) -> None: + """ + This is overridden in the class setup function to ensure that the value is not set from a previous run + when being run in a TestSuite + """ + IntegrationTestUtils.TEST_OUT_PATH = None + def set_expected_values(self): IntegrationTestUtils.TEST_START_DATE = '20221001' IntegrationTestUtils.TEST_JOB_DIR = "ADVISORY_" + IntegrationTestUtils.TEST_START_DATE diff --git a/tests/integration/partial/test_deposition.py b/tests/integration/partial/test_deposition.py index 3e09ddcdeda5c7886990e3358be5dfa475105d3d..92a6e1f00dcc576527c882aa81ac36b846887f0a 100644 --- a/tests/integration/partial/test_deposition.py +++ b/tests/integration/partial/test_deposition.py @@ -8,6 +8,14 @@ from integration.test_suites.depo_test_suite import BaseDepoTestSuite class TestDeposition(BaseDepoTestSuite.DepoTestSuite): + @classmethod + def setUpClass(cls) -> None: + """ + This is overridden in the class setup function to ensure that the value is not set from a previous run + when being run in a TestSuite + """ + IntegrationTestUtils.TEST_OUT_PATH = None + def set_expected_values(self): IntegrationTestUtils.TEST_START_DATE = "20221001" @@ -24,7 +32,7 @@ class TestDeposition(BaseDepoTestSuite.DepoTestSuite): if IntegrationTestUtils.TEST_OUT_PATH is None or not os.path.isdir(IntegrationTestUtils.TEST_OUT_PATH): TestDeposition.write_temp_run_config_file() - # TestDeposition.run_depo_pipeline() + TestDeposition.run_depo_pipeline() else: print(f"output in {IntegrationTestUtils.TEST_OUT_PATH} already written, skipping rerun") diff --git a/tests/integration/partial/test_env_suit.py b/tests/integration/partial/test_env_suit.py index 6d658787d76f77f0d9f46e0b59b7696d06e4fda5..8c33a3d1c90960d4631ea9dff14d36aaa8000835 100644 --- a/tests/integration/partial/test_env_suit.py +++ b/tests/integration/partial/test_env_suit.py @@ -8,6 +8,14 @@ from integration.test_suites.env_suit_test_suite import BaseEnvSuitTestSuite class TestEnvSuit(BaseEnvSuitTestSuite.EnvSuitTestSuite): + @classmethod + def setUpClass(cls) -> None: + """ + This is overridden in the class setup function to ensure that the value is not set from a previous run + when being run in a TestSuite + """ + IntegrationTestUtils.TEST_OUT_PATH = None + def set_expected_values(self): IntegrationTestUtils.TEST_START_DATE = "20221001" IntegrationTestUtils.TEST_JOB_DIR = "ENVIRONMENT_2.0_" + IntegrationTestUtils.TEST_START_DATE diff --git a/tests/integration/partial/test_epi.py b/tests/integration/partial/test_epi.py index c9d98d496764db10b7104d30ab732de762e9ae01..46ba53a399463c7810438dca03014852ea73603d 100644 --- a/tests/integration/partial/test_epi.py +++ b/tests/integration/partial/test_epi.py @@ -8,6 +8,14 @@ from integration.test_suites.epi_test_suite import BaseEpiTestSuite class TestEpi(BaseEpiTestSuite.EpiTestSuite): + @classmethod + def setUpClass(cls) -> None: + """ + This is overridden in the class setup function to ensure that the value is not set from a previous run + when being run in a TestSuite + """ + IntegrationTestUtils.TEST_OUT_PATH = None + def set_expected_values(self): super().set_expected_values() BaseEpiTestSuite.EpiTestSuite.TEST_START_DATE = '20221001' diff --git a/tests/integration/partial/test_survey.py b/tests/integration/partial/test_survey.py index faca2fce1d3e031acf11466e90c01967a223565e..59d63d5841b11f4357b1c29056a260fe7656cd1c 100644 --- a/tests/integration/partial/test_survey.py +++ b/tests/integration/partial/test_survey.py @@ -8,6 +8,14 @@ from integration.test_suites.survey_test_suite import BaseSurveyTestSuite class TestSurvey(BaseSurveyTestSuite.SurveyTestSuite): + @classmethod + def setUpClass(cls) -> None: + """ + This is overridden in the class setup function to ensure that the value is not set from a previous run + when being run in a TestSuite + """ + IntegrationTestUtils.TEST_OUT_PATH = None + def set_expected_values(self): IntegrationTestUtils.TEST_START_DATE = '20221001' IntegrationTestUtils.TEST_JOB_DIR = "SURVEYDATA_" + IntegrationTestUtils.TEST_START_DATE diff --git a/tests/integration/test_suites/advisory_test_suite.py b/tests/integration/test_suites/advisory_test_suite.py index fe3dfeff18cc464d6f458c4879310797a470b948..abe06ab0fca0d11942408c187bd39b23771cb30c 100644 --- a/tests/integration/test_suites/advisory_test_suite.py +++ b/tests/integration/test_suites/advisory_test_suite.py @@ -19,10 +19,6 @@ class BaseAdvisoryTestSuite: """ ADVISORY_PROCESSOR_DIR = "ADVISORY" - @classmethod - def setUpClass(cls) -> None: - IntegrationTestUtils.TEST_OUT_PATH = None # reset this value for each new test class - @abc.abstractmethod def set_expected_values(self): self.EXPECTED_EA_IMAGE_COUNT = 0 diff --git a/tests/integration/test_suites/depo_test_suite.py b/tests/integration/test_suites/depo_test_suite.py index 36938799dc42bcbd5373d455cef0dd7bc48fab09..15f88ea5994fbe13901254faff5e141781ceabca 100644 --- a/tests/integration/test_suites/depo_test_suite.py +++ b/tests/integration/test_suites/depo_test_suite.py @@ -19,10 +19,6 @@ class BaseDepoTestSuite: """ DEPO_PROCESSOR_DIR = "DEPOSITION" - @classmethod - def setUpClass(cls) -> None: - IntegrationTestUtils.TEST_OUT_PATH = None # reset this value for each new test class - @abc.abstractmethod def set_expected_values(self): """ diff --git a/tests/integration/test_suites/env_suit_test_suite.py b/tests/integration/test_suites/env_suit_test_suite.py index ebba559b5766b7ffb0ec0be666ce5846dc3e14c2..54d7f2cbee9cd152d656367a1e96af329fab32d7 100644 --- a/tests/integration/test_suites/env_suit_test_suite.py +++ b/tests/integration/test_suites/env_suit_test_suite.py @@ -19,11 +19,6 @@ class BaseEnvSuitTestSuite: """ ENV_PROCESSOR_DIR = "ENVIRONMENT_2.0" - @classmethod - def setUpClass(cls) -> None: - IntegrationTestUtils.TEST_OUT_PATH = None # reset this value for each new test class - - @abc.abstractmethod def set_expected_values(self): """ diff --git a/tests/integration/test_suites/epi_test_suite.py b/tests/integration/test_suites/epi_test_suite.py index 0a30cd9e694c339986602762afb6790d65d0cd40..c931d7a146195df49f5abe3e2250d2efe9c5cd63 100644 --- a/tests/integration/test_suites/epi_test_suite.py +++ b/tests/integration/test_suites/epi_test_suite.py @@ -18,10 +18,6 @@ class BaseEpiTestSuite: """ EPI_PROCESSOR_DIR = "EPI" - @classmethod - def setUpClass(cls) -> None: - IntegrationTestUtils.TEST_OUT_PATH = None # reset this value for each new test class - @abc.abstractmethod def set_expected_values(self): pass diff --git a/tests/integration/test_suites/survey_test_suite.py b/tests/integration/test_suites/survey_test_suite.py index ef1ad710ff5f0d4386c48d209c34d60d6813885f..83ef237a7212493e6867c819dac1cefcacd14a9a 100644 --- a/tests/integration/test_suites/survey_test_suite.py +++ b/tests/integration/test_suites/survey_test_suite.py @@ -18,10 +18,6 @@ class BaseSurveyTestSuite: """ SURVEY_PROCESSOR_DIR = "SURVEYDATA" - @classmethod - def setUpClass(cls) -> None: - IntegrationTestUtils.TEST_OUT_PATH = None # reset this value for each new test class - @abc.abstractmethod def set_expected_values(self): pass