Spaces:
Runtime error
Runtime error
| from __future__ import annotations | |
| import re | |
| from pathlib import Path | |
| import pytest | |
| _BACKEND_ROOT = Path(__file__).resolve().parents[1] | |
| _FORBIDDEN = re.compile( | |
| r"Condition Rating|CR[123]|_RICS_LETTER", | |
| re.IGNORECASE, | |
| ) | |
| def test_no_rics_hardcodes_in_production(path: Path): | |
| text = path.read_text(encoding="utf-8") | |
| matches = _FORBIDDEN.findall(text) | |
| assert not matches, f"{path}: forbidden RICS constants {matches}" | |