dns-blocklist-mirror/tests/test_repository.py
XLion 057322d7f8
All checks were successful
Checks / checks (push) Successful in 45s
Deploy Pages / deploy (push) Successful in 29s
Keep mirror inventory out of README
2026-08-15 07:25:44 +08:00

15 lines
492 B
Python

from pathlib import Path
from dns_blocklist_mirror.config import load_config
REPOSITORY_ROOT = Path(__file__).parents[1]
def test_readme_does_not_duplicate_the_mirror_inventory() -> None:
config = load_config(REPOSITORY_ROOT / "mirrors.yaml")
readme = (REPOSITORY_ROOT / "README.md").read_text(encoding="utf-8")
for mirror in config.mirrors:
assert str(mirror.relative_path) not in readme
for source in mirror.sources:
assert source not in readme