From 5c969445340713dfa6d7a8d62e37a2d0336f95ef Mon Sep 17 00:00:00 2001 From: lb584 <lb584@cam.ac.uk> Date: Thu, 28 Sep 2023 16:34:40 +0100 Subject: [PATCH] making the Processor.py pass on non-zero exit codes when exiting - I THINK THIS COULD CAUSE PROEBLEMS WITH INTEGRATION TESTS, AS IT WILL EXIT THE PYTHON ENVIRONMENT RATHER THAN CARRYING ON TO THE ASSERTS IF THERE IS AN ERROR, WILL ROLE BACK IF THIS IS THE CASE --- coordinator/Processor.py | 6 +++--- tests/integration/full/full_test_env_suit.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/coordinator/Processor.py b/coordinator/Processor.py index 100b7a8..84d3d3b 100755 --- a/coordinator/Processor.py +++ b/coordinator/Processor.py @@ -605,10 +605,10 @@ if __name__ == '__main__': args_dict: dict = parse_and_check_args(todayString) set_log_level(args_dict['log_level']) run_Process(args_dict) - except SystemExit: - + except SystemExit as e: + print("caught with code " + str(e.code)) logger.info('run_process() exited') - pass + sys.exit(e.code) except: logger.exception('Uncaught exception in run_Process:') diff --git a/tests/integration/full/full_test_env_suit.py b/tests/integration/full/full_test_env_suit.py index b5bd5bc..aa4d5cb 100644 --- a/tests/integration/full/full_test_env_suit.py +++ b/tests/integration/full/full_test_env_suit.py @@ -9,8 +9,8 @@ from integration.test_suites.env_suit_test_suite import BaseEnvSuitTestSuite class FullTestEnvSuit(BaseEnvSuitTestSuite.EnvSuitTestSuite): def set_expected_values(self): - self.EA_CSV_COUNT: int = 30 - self.ETH_CSV_COUNT: int = 30 + self.EA_CSV_COUNT: int = 18 + self.ETH_CSV_COUNT: int = 18 self.EA_PNG_COUNT: int = 6 self.ETH_PNG_COUNT: int = 6 -- GitLab