mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 16:43:05 +02:00
FBT001/FBT002 fixes: - Make boolean params keyword-only with *, syntax in: - stockfish_analysis/analyze_chess_game.py: pov_white - lichess_bot/main.py: decline_correspondence - screen_locker/screen_lock.py: demo_mode - Update call sites to use keyword arguments ARG001/ARG002 fixes: - Prefix unused params with underscore: - extractLinks/main.py: tag -> _tag - lichess_bot/lichess_api.py: game_id -> _game_id - lichess_bot/tests/conftest.py: config -> _config FBT003 per-file ignores (external API calls): - PYTHON/keyboardCoop/main.py: pygame.font.render - PYTHON/screen_locker/screen_lock.py: tkinter API - poker-modifier-app/poker_modifier_app.py: tkinter API
23 lines
697 B
Python
23 lines
697 B
Python
import os
|
|
from pathlib import Path
|
|
import sys
|
|
|
|
import pytest
|
|
|
|
# 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: pytest.Config) -> bool | None:
|
|
"""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"
|
|
)
|