mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 15:03:01 +02:00
- Add +x to Python scripts with shebangs (3 files) - Remove -x from non-script files like .cpp, .txt, makefile (23 files) - Move shebang to first line in C/imageViewer/lint.sh
21 lines
665 B
Python
21 lines
665 B
Python
import os
|
|
from pathlib import Path
|
|
import sys
|
|
|
|
# Add repository root to sys.path so 'import PYTHON.*' works when running
|
|
# pytest with a subdirectory as rootdir.
|
|
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../.."))
|
|
if ROOT not in sys.path:
|
|
sys.path.insert(0, ROOT)
|
|
|
|
|
|
def pytest_ignore_collect(collection_path: Path, config):
|
|
"""Ignore per-game blunder test files; keep only the unified one.
|
|
|
|
This lets us keep historical files in the repo without collecting them.
|
|
"""
|
|
basename = collection_path.name
|
|
if basename.startswith("test_blunders_") and basename != "test_blunders_all.py":
|
|
return True
|
|
return False
|