testsAndMisc/PYTHON/lichess_bot/tests/conftest.py
Krzysztof kuhy Rudnicki 5d4ce33dcd fix: enforce 88-char line length limit (E501)
- Fixed all 119 line-too-long errors across Python files
- Broke long strings, comments, and docstrings into multiline format
- All pre-commit hooks now pass with strict 88-char limit
2025-11-30 14:25:35 +01:00

21 lines
651 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
return bool(
basename.startswith("test_blunders_") and basename != "test_blunders_all.py"
)