diff --git a/pytest_abra/cli.py b/pytest_abra/cli.py index 30cd187..1ebf852 100644 --- a/pytest_abra/cli.py +++ b/pytest_abra/cli.py @@ -18,7 +18,7 @@ def run(): parser.add_argument("--debug", action="store_true", help="Enable Playwright debug mode") parser.add_argument("--resume", action="store_true", help="Re-run the most recent test, skipping passed tests") args = parser.parse_args() - ENV_FILES = [Path(s) for s in args.env_paths.split(";")] + env_paths = [Path(s) for s in args.env_paths.split(";")] # -------------------------- enable playwright debug ------------------------- # @@ -43,7 +43,7 @@ def run(): # ---------------------------- initialize and run ---------------------------- # coordinator = Coordinator( - env_paths_list=ENV_FILES, + env_paths=env_paths, output_dir=args.output_dir, session_id=session_id, recipes_dir=args.recipes_dir, diff --git a/pytest_abra/coordinator.py b/pytest_abra/coordinator.py index 66e953a..4d9e2d9 100644 --- a/pytest_abra/coordinator.py +++ b/pytest_abra/coordinator.py @@ -15,21 +15,21 @@ from pytest_abra.utils import rmtree class Coordinator: def __init__( self, - env_paths_list: list[Path], + env_paths: list[Path], output_dir: Path, session_id: str, recipes_dir: Path, timeout: int, ) -> None: # logging - out_string = "".join([e.name + "\n" for e in env_paths_list]) + out_string = "".join([e.name + "\n" for e in env_paths]) out_string += f"output_dir = {output_dir}\n" out_string += f"session_id = {session_id}" logger.info(f"initialize Coordinator instance with\nenv_paths_list =\n{out_string}") self.RUNNER_DICT = self.create_runner_dict(recipes_dir) self.DIR = DirManager(output_dir=output_dir, session_id=session_id, recipes_dir=recipes_dir) - self.ENV = EnvManager(env_paths_list, self.RUNNER_DICT) + self.ENV = EnvManager(env_paths=env_paths, RUNNER_DICT=self.RUNNER_DICT) self.TIMEOUT = timeout def setup_test(self) -> None: diff --git a/pytest_abra/env_manager.py b/pytest_abra/env_manager.py index f6f16b5..1fb2e37 100644 --- a/pytest_abra/env_manager.py +++ b/pytest_abra/env_manager.py @@ -23,8 +23,8 @@ class DependencyRule(NamedTuple): class EnvManager: - def __init__(self, env_paths_list: list[Path], RUNNER_DICT: dict[str, type["Runner"]]): - self.env_files: list[EnvFile] = self._get_env_files(env_paths_list) + def __init__(self, env_paths: list[Path], RUNNER_DICT: dict[str, type["Runner"]]): + self.env_files: list[EnvFile] = self._get_env_files(env_paths) self.dependency_rules: list[DependencyRule] = self._get_dependency_rules(self.env_files, RUNNER_DICT) self.env_files = self.sort_env_files_by_rule(self.env_files, self.dependency_rules)