rename runner.name to runner.env_type

This commit is contained in:
Daniel 2023-12-05 23:24:37 +01:00
parent e415b8a16a
commit a6c7a18e7b
7 changed files with 10 additions and 10 deletions

View file

@ -18,7 +18,7 @@ class Test:
class Runner:
name: str = ""
env_type: str = ""
setups: list[Test] = []
tests: list[Test] = []
cleanups: list[Test] = []
@ -54,7 +54,7 @@ class Runner:
"""runs the main test script and if available and sub test scripts if their running condition is met"""
# check if required dependencies have passed
if not self._dependencies_passed():
logger.warning(f"skipping run_tests() of {self.name}, because some dependencies have not passed")
logger.warning(f"skipping run_tests() of {self.env_type}, because some dependencies have not passed")
return
for test in test_list:
@ -67,7 +67,7 @@ class Runner:
# condition_available: true / pass
# condition_met: true / false
identifier_string = self.combine_names(self.name, test.test_file)
identifier_string = self.combine_names(self.env_type, test.test_file)
results = list(self.DIR.RECIPES.rglob(test.test_file))
assert len(results) == 1, f"{test.test_file} should exist exactly 1 time, but found {len(results)} times"
@ -177,7 +177,7 @@ class Runner:
results = []
for dependency_runner in self._dependency_runners:
for setup_name in dependency_runner.setups:
dependencie_identifier = self.combine_names(dependency_runner.name, setup_name.test_file)
dependencie_identifier = self.combine_names(dependency_runner.env_type, setup_name.test_file)
results.append(any(dependencie_identifier in f for f in passed_tests))
return all(results)