Projeto do Agent Contas ORACLE
This commit is contained in:
17
tests/migration/test_no_legacy_dependency.py
Normal file
17
tests/migration/test_no_legacy_dependency.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
SCANNED = [ROOT / "app", ROOT / "mcp", ROOT / "config"]
|
||||
FORBIDDEN = "agente_" + "contas_tim"
|
||||
|
||||
|
||||
def test_no_legacy_imports_or_references():
|
||||
violations = []
|
||||
for base in SCANNED:
|
||||
for path in base.rglob("*"):
|
||||
if not path.is_file() or path.suffix not in {".py", ".yaml", ".yml"}:
|
||||
continue
|
||||
text = path.read_text(encoding="utf-8", errors="ignore")
|
||||
if FORBIDDEN in text:
|
||||
violations.append(str(path.relative_to(ROOT)))
|
||||
assert not violations, f"Dependências do pacote anterior encontradas: {violations}"
|
||||
Reference in New Issue
Block a user