diff --git a/src/runner.py b/src/runner.py index 16e7661..f34e97a 100644 --- a/src/runner.py +++ b/src/runner.py @@ -14,6 +14,7 @@ class SubTest(TypedDict): class Runner: + name: Optional[str] = None test_dir_name: Optional[str] = None main_setup_name: Optional[str] = None main_test_name: Optional[str] = None @@ -85,6 +86,7 @@ class Runner: ic(list(self.root_dir.glob("*"))) def run_tests(self): + self._check_dependencies() self._run_main_test() for sub_test in self.sub_tests: condition_function = sub_test["condition"] @@ -92,3 +94,14 @@ class Runner: test_name = sub_test["test_file"] full_test_path = self.root_dir / self.test_dir_name / test_name self._run_pytest(full_test_path) + self._create_complete_file() + + def _create_complete_file(self): + file_path = self.dir_manager.RESULTS / self.name + with open(file_path, "w") as _: + pass # pass does nothing, so the file remains empty + + def _check_dependencies(self): + for dependencie in self.dependencies: + ic(f"checking {dependencie}") + assert dependencie in self.dir_manager.RESULTS.glob("*") diff --git a/src/tests_authentik/runner_authentik.py b/src/tests_authentik/runner_authentik.py index ffbad52..fbdf44c 100644 --- a/src/tests_authentik/runner_authentik.py +++ b/src/tests_authentik/runner_authentik.py @@ -14,6 +14,7 @@ def condition_always_false(dotenv_path: Path) -> bool: class RunnerAuthentik(Runner): + name = "authentik" test_dir_name = "tests_authentik" main_setup_name = "setup_authentik.py" # main_test_name = "test_authentik_dummy.py" diff --git a/src/tests_wordpress/runner_wordpress.py b/src/tests_wordpress/runner_wordpress.py index b0fef11..de9e501 100644 --- a/src/tests_wordpress/runner_wordpress.py +++ b/src/tests_wordpress/runner_wordpress.py @@ -12,6 +12,7 @@ def condition_always_false(dotenv_path: Path) -> bool: class RunnerWordpress(Runner): + name = "wordpress" test_dir_name = "tests_wordpress" # main_test_name = "test_wordpress.py" sub_tests = [