remove assert in _dependencies_passed, because it crashes the coordinator. instead, just skip the test with a warning
This commit is contained in:
parent
e446102912
commit
19f44f3028
1 changed files with 8 additions and 5 deletions
|
|
@ -36,7 +36,9 @@ class Runner:
|
|||
|
||||
def run_tests(self):
|
||||
# check if required dependencies have passed
|
||||
self._assert_dependencies_passed()
|
||||
if not self._dependencies_passed():
|
||||
logger.warning("skipping run_tests() of {self.name}, because some dependencies have not passed")
|
||||
return
|
||||
|
||||
# run main setup if available
|
||||
if isinstance(self.main_setup_name, str):
|
||||
|
|
@ -64,6 +66,9 @@ class Runner:
|
|||
self._create_result_file(result=-1, identifier_string=identifier_string)
|
||||
|
||||
def run_cleanup(self):
|
||||
if not self._dependencies_passed():
|
||||
logger.warning("skipping run_cleanup() of {self.name}, because some dependencies have not passed")
|
||||
return
|
||||
if isinstance(self.main_cleanup_name, str):
|
||||
identifier_string = self.combine_names(self.name, self.main_cleanup_name)
|
||||
test_path = self.root_dir / self.test_dir_name / self.main_cleanup_name
|
||||
|
|
@ -153,15 +158,13 @@ class Runner:
|
|||
with open(file_path, "w") as _:
|
||||
pass # create empty file
|
||||
|
||||
def _assert_dependencies_passed(self):
|
||||
def _dependencies_passed(self):
|
||||
"""assert that all dependencie setups passed before"""
|
||||
|
||||
passed_tests = [r.name for r in self.DIRS.RESULTS.glob("*") if "passed" in r.name]
|
||||
for dependencie in self.dependencies:
|
||||
dependencie_identifier = self.combine_names(dependencie.name, dependencie.main_setup_name)
|
||||
assert any(
|
||||
dependencie_identifier in f for f in passed_tests
|
||||
), f"could not run {self.name} because {dependencie} did not run before"
|
||||
return any(dependencie_identifier in f for f in passed_tests)
|
||||
|
||||
@staticmethod
|
||||
def result_int_to_str(result_int: int) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue