diff options
Diffstat (limited to 'test/test_runtime.py')
-rw-r--r-- | test/test_runtime.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_runtime.py b/test/test_runtime.py index 2af343d..6a110d4 100644 --- a/test/test_runtime.py +++ b/test/test_runtime.py @@ -1,4 +1,5 @@ """Tests for Runtime class.""" + # pylint: disable=protected-access from __future__ import annotations @@ -242,8 +243,8 @@ def cwd(path: Path) -> Iterator[None]: def test_prerun_reqs_v1(caplog: pytest.LogCaptureFixture) -> None: """Checks that the linter can auto-install requirements v1 when found.""" - runtime = Runtime(verbosity=1) path = Path(__file__).parent.parent / "examples" / "reqs_v1" + runtime = Runtime(project_dir=path, verbosity=1) with cwd(path): runtime.prepare_environment() assert any( @@ -257,8 +258,8 @@ def test_prerun_reqs_v1(caplog: pytest.LogCaptureFixture) -> None: def test_prerun_reqs_v2(caplog: pytest.LogCaptureFixture) -> None: """Checks that the linter can auto-install requirements v2 when found.""" - runtime = Runtime(verbosity=1) path = (Path(__file__).parent.parent / "examples" / "reqs_v2").resolve() + runtime = Runtime(project_dir=path, verbosity=1) with cwd(path): runtime.prepare_environment() assert any( @@ -271,9 +272,10 @@ def test_prerun_reqs_v2(caplog: pytest.LogCaptureFixture) -> None: ) -def test_prerun_reqs_broken(runtime: Runtime) -> None: +def test_prerun_reqs_broken() -> None: """Checks that the we report invalid requirements.yml file.""" path = (Path(__file__).parent.parent / "examples" / "reqs_broken").resolve() + runtime = Runtime(project_dir=path, verbosity=1) with cwd(path), pytest.raises(InvalidPrerequisiteError): runtime.prepare_environment() @@ -580,7 +582,7 @@ def test_install_galaxy_role_name_role_name_check_equals_to_1( caplog: pytest.LogCaptureFixture, ) -> None: """Check install role with bad role name in galaxy info.""" - caplog.set_level(logging.WARN) + caplog.set_level(logging.WARNING) pathlib.Path(f"{runtime_tmp.project_dir}/meta").mkdir() pathlib.Path(f"{runtime_tmp.project_dir}/meta/main.yml").write_text( galaxy_info, |