Coverage for tests / scripts / test_shell_scripts.py: 100%
13 statements
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
« prev ^ index » next coverage.py v7.13.0, created at 2026-04-03 18:53 +0000
1"""Tests for shell scripts in the scripts/ directory.
3This module tests the shell scripts to ensure they follow best practices,
4have correct syntax, and provide appropriate help/usage information.
5"""
7import subprocess
8from pathlib import Path
10from assertpy import assert_that
13def test_detect_changes_help() -> None:
14 """detect-changes.sh should provide help and exit 0."""
15 script_path = Path("scripts/ci/detect-changes.sh").resolve()
16 result = subprocess.run(
17 [str(script_path), "--help"],
18 capture_output=True,
19 text=True,
20 )
21 assert_that(result.returncode).is_equal_to(0)
22 assert_that(result.stdout).contains("Usage:")
25def test_renovate_regex_manager_current_value() -> None:
26 """Ensure Renovate custom managers use currentValue to satisfy schema."""
27 config_path = Path("renovate.json")
28 content = config_path.read_text()
29 assert_that(content).contains("customManagers")
30 assert_that(content).contains("currentValue")