diff --git a/src/aipass/seedgo/apps/handlers/aipass_standards/readme_check.py b/src/aipass/seedgo/apps/handlers/aipass_standards/readme_check.py index 5f6aa521..f691dc28 100644 --- a/src/aipass/seedgo/apps/handlers/aipass_standards/readme_check.py +++ b/src/aipass/seedgo/apps/handlers/aipass_standards/readme_check.py @@ -30,7 +30,7 @@ from typing import Dict, List, Optional from aipass.prax import logger from aipass.seedgo.apps.handlers.json import json_handler from aipass.seedgo.apps.handlers.bypass.utils import is_bypassed -from aipass.seedgo.apps.handlers.aipass_standards.skip_dirs import is_disabled_file +from aipass.seedgo.apps.handlers.aipass_standards.skip_dirs import SOURCE_SKIP_DIRS, is_disabled_file # Audit scope: entry points only (apps/{name}.py) AUDIT_SCOPE = "entry_point" @@ -505,6 +505,8 @@ def _count_test_functions(tests_dir: Path) -> int: count = 0 test_func_pattern = re.compile(r"^\s*def\s+test_", re.MULTILINE) for test_file in tests_dir.rglob("test_*.py"): + if any(part in SOURCE_SKIP_DIRS for part in test_file.relative_to(tests_dir).parts): + continue if is_disabled_file(test_file.name): continue try: diff --git a/src/aipass/seedgo/apps/handlers/aipass_standards/test_quality_check.py b/src/aipass/seedgo/apps/handlers/aipass_standards/test_quality_check.py index 2735b4ba..c627cde0 100644 --- a/src/aipass/seedgo/apps/handlers/aipass_standards/test_quality_check.py +++ b/src/aipass/seedgo/apps/handlers/aipass_standards/test_quality_check.py @@ -195,7 +195,7 @@ def _find_test_files_broad(branch_path: Path) -> list[Path]: for py_file in sorted(tests_dir.rglob("*.py")): if py_file.name in ("__init__.py", "conftest.py"): continue - if "__pycache__" in py_file.parts: + if any(_should_skip_dir(part) for part in py_file.relative_to(tests_dir).parts): continue resolved = py_file.resolve() if resolved not in seen: