1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
From: "Michael R. Crusoe" <crusoe@debian.org>
Date: Sun, 6 Apr 2025 15:10:41 +0100
Subject: Debian-specific changes for running the tests offline during the
build
Forwarded: not-needed
---
conftest.py | 19 +------------------
test/test_schemas.py | 3 ---
2 files changed, 1 insertion(+), 21 deletions(-)
--- a/conftest.py
+++ b/conftest.py
@@ -16,7 +16,7 @@
# checking if user is running pytest without installing test dependencies:
missing = [
- module for module in ["ansible", "black", "mypy", "pylint"] if not find_spec(module)
+ module for module in ["ansible", "black"] if not find_spec(module)
]
if missing:
pytest.exit(
@@ -30,23 +30,6 @@
"""Ensure we run preparation only on master thread when running in parallel."""
if is_help_option_present(config):
return
- if is_master(config):
- # linter should be able de detect and convert some deprecation warnings
- # into validation errors but during testing we disable this to avoid
- # unnecessary noise. Still, we might want to enable it for particular
- # tests, for testing our ability to detect deprecations.
- os.environ["ANSIBLE_DEPRECATION_WARNINGS"] = "False"
- # we need to be sure that we have the requirements installed as some tests
- # might depend on these. This approach is compatible with GHA caching.
- try:
- subprocess.check_output( # noqa: S603
- ["./tools/install-reqs.sh"],
- stderr=subprocess.PIPE,
- text=True,
- )
- except subprocess.CalledProcessError as exc:
- print(f"{exc}\n{exc.stderr}\n{exc.stdout}", file=sys.stderr) # noqa: T201
- sys.exit(1)
def is_help_option_present(config: pytest.Config) -> bool:
--- a/test/test_schemas.py
+++ b/test/test_schemas.py
@@ -20,9 +20,6 @@
from ansiblelint.schemas.main import validate_file_schema
schema_path = Path(schema_module).parent
-spdx_config_path = (
- Path(license_expression.__file__).parent / "data" / "scancode-licensedb-index.json"
-)
def urlopen_side_effect(*_args: Any, **kwargs: Any) -> Any:
|