From 24dae132a12c6fd0b73b991439107c322a2bdb2c Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 5 Dec 2023 16:50:17 +0100 Subject: [PATCH] turn dependencies into strings --- src/runner.py | 2 +- src/tests_demo/runner_demo.py | 2 +- src/tests_nextcloud/runner_nextcloud.py | 3 +-- src/tests_wordpress/runner_wordpress.py | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/runner.py b/src/runner.py index 8ef444a..f73b88b 100644 --- a/src/runner.py +++ b/src/runner.py @@ -22,7 +22,7 @@ class Runner: setups: list[Test] = [] tests: list[Test] = [] cleanups: list[Test] = [] - dependencies: list[type["Runner"]] = [] + dependencies: list[str] = [] prevent_skip = False def __init__(self, dotenv_path: Path, output_dir: Path, session_id: str): diff --git a/src/tests_demo/runner_demo.py b/src/tests_demo/runner_demo.py index 2957ad5..67292c2 100644 --- a/src/tests_demo/runner_demo.py +++ b/src/tests_demo/runner_demo.py @@ -12,7 +12,7 @@ class RunnerDemo(Runner): # RunnerDemo will only execute, when setup_authentik.py has finished successfully. # For example, setup_authentik.py generates session states, that can be used as fixtures # that can be loaded from fixtures_authentik.py - dependencies: list[type["Runner"]] = [RunnerAuthentik] + dependencies: list[str] = ["authentik"] # todo: update these comments # Filename of Demo setup. If defined, it will run 1st by executing pytest diff --git a/src/tests_nextcloud/runner_nextcloud.py b/src/tests_nextcloud/runner_nextcloud.py index b866592..e3f4ed4 100644 --- a/src/tests_nextcloud/runner_nextcloud.py +++ b/src/tests_nextcloud/runner_nextcloud.py @@ -1,5 +1,4 @@ from src.runner import Runner, Test -from src.tests_authentik.runner_authentik import RunnerAuthentik def condition_always_false(dotenv_config: dict[str, str]) -> bool: @@ -9,7 +8,7 @@ def condition_always_false(dotenv_config: dict[str, str]) -> bool: class RunnerNextcloud(Runner): name: str = "nextcloud" test_dir_name: str = "tests_nextcloud" - dependencies = [RunnerAuthentik] + dependencies = ["authentik"] setups = [Test(test_file="setup_nextcloud.py", prevent_skip=False)] tests = [ Test(test_file="tests_nextcloud.py", prevent_skip=True), diff --git a/src/tests_wordpress/runner_wordpress.py b/src/tests_wordpress/runner_wordpress.py index 097a66a..9b9ffa1 100644 --- a/src/tests_wordpress/runner_wordpress.py +++ b/src/tests_wordpress/runner_wordpress.py @@ -1,5 +1,4 @@ from src.runner import Runner, Test -from src.tests_authentik.runner_authentik import RunnerAuthentik def condition_always_true(dotenv_config: dict[str, str]) -> bool: @@ -20,7 +19,7 @@ def condition_has_locale(dotenv_config: dict[str, str]) -> bool: class RunnerWordpress(Runner): name = "wordpress" test_dir_name = "tests_wordpress" - dependencies: list[type[Runner]] = [RunnerAuthentik] + dependencies = ["authentik"] setups = [Test(test_file="setup_wordpress.py")] tests = [ Test(test_file="test_wordpress.py"),