diff --git a/pytest_abra/pytest_abra.py b/pytest_abra/pytest_abra.py index 33a74ae..db6514f 100644 --- a/pytest_abra/pytest_abra.py +++ b/pytest_abra/pytest_abra.py @@ -63,6 +63,12 @@ def DIR(request) -> DirManager: @pytest.fixture(scope="session") def ENV_FILES(DIR: DirManager) -> dict[int, EnvFile]: + """Dictionary of all EnvFile instances of the current test run + + key: runner_index + value: EnvFile of the related env file + """ + out: dict[int, EnvFile] = dict() for env_path in DIR.ENV_FILES.glob("*.env"): config: dict[str, str] = dotenv_values(env_path) # type: ignore @@ -76,12 +82,14 @@ def ENV_FILES(DIR: DirManager) -> dict[int, EnvFile]: @pytest.fixture(scope="session") def dotenv_config(request, ENV_FILES: dict[int, EnvFile]) -> dict[str, str]: + """Current env_config""" runner_index = request.config.getoption("--runner_index") return ENV_FILES[runner_index].config @pytest.fixture(scope="session") def URL(dotenv_config: dict[str, str]) -> BaseUrl: + """BaseUrl object based on current DOMAIN""" return BaseUrl(netloc=dotenv_config["DOMAIN"])