pytest-fast-subset-unmarked-heavy-classes
Done. I diagnosed the problem against the real repo (cloned wojons/ai_plays_poke, examined the fix commit 0f35360) and wrote the self-contained solution to ~/solution.md.
0f35360 HEAD) and read the complete diff.test_integration.py is only ~10.2s; the real cost was the unmarked heavy classes (network retry/backoff, memory/perf benchmarks, RAM scan, mode-duration) that -m "not integration" couldn't exclude because they carried no marker.pyproject.toml [tool.pytest.ini_options].markers — both slow and integration are declared, and a scan of all @pytest.mark.* usage across tests/ shows only builtins (skip, skipif, parametrize) and registered markers (slow, integration, live_api, rom), so --strict-markers collection won't fail.@pytest.mark.slow for retry/perf/RAM/mode classes; function-level @pytest.mark.slow for isolated slow tests in test_ai_client.py; class-level @pytest.mark.integration for component-flow classes; README command updated to -m "not integration and not slow").Note: I could not execute the full test run in the sandbox (missing Python deps like pyboy/openai cause a collection-time import failure unrelated to this fix). The solution therefore cites the measured numbers from the problem/commit (3825 passed / 8 skipped / 62 deselected in ~68s, full suite 3881 passed / 14 skipped in ~180s) and includes the exact markers, commands, a measurement-first step (--durations=25), and a check-list covering the -k gameplay / registration pitfalls.
# Evidence - Problem class: pytest-fast-subset-unmarked-heavy-classes - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-16T18:51:02.881Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "A documented pytest 'fast subset' command (e.g. -m 'not integration') takes >90s and barely progresses, because heavy test classes run UNMARKED so the exclusion marker excludes nothing. Solved 2026-08-16 in ai_plays_poke (GAP-026, commit 0f35360): root cause was NOT the obvious integration file (tests/test_integration.py was only 10.2s of the suite) but OTHER unmarked heavy tests (network retry/backoff classes ~12s each, memory/performance benchmarks ~11s, RAM scanning ~9s, mode-duration ~9s, API retry tests). Fix: measure first (pytest --durations or timing), then mark ALL heavy classes with @pytest.mark.slow (class-level for retry/perf classes, function-level for isolated slow tests) plus @pytest.mark.integration for component-flow classes; document the combined command .venv/bin/python -m pytest tests/ -q -m 'not integration and not slow' with measured runtimes in README. Result: 3825 passed/8 skipped/62 deselected in 68s (85s under host load), full suite unchanged 3881 passed/14 skipped in ~180s. Pitfall: a '-k gameplay' alternative does NOT work when slow tests are not gameplay-marked; verify the marker registration exists in pyproject.toml [tool.pytest.ini_options].", "environment": "", "language": "python", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "pytest-fast-subset-unmarked-heavy-classes", "provider": "openrouter", "solved_at": "2026-08-16T18:51:02.882Z", "version": ""}Done. I diagnosed the problem against the real repo (cloned wojons/ai_plays_poke, examined the fix commit 0f35360) and wrote the self-contained solution to ~/solution.md.
0f35360 HEAD) and read the complete diff.test_integration.py is only ~10.2s; the real cost was the unmarked heavy classes (network retry/backoff, memory/perf benchmarks, RAM scan, mode-duration) that -m "not integration" couldn't exclude because they carried no marker.pyproject.toml [tool.pytest.ini_options].markers — both slow and integration are declared, and a scan of all @pytest.mark.* usage across tests/ shows only builtins (skip, skipif, parametrize) and registered markers (slow, integration, live_api, rom), so --strict-markers collection won't fail.@pytest.mark.slow for retry/perf/RAM/mode classes; function-level @pytest.mark.slow for isolated slow tests in test_ai_client.py; class-level @pytest.mark.integration for component-flow classes; README command updated to -m "not integration and not slow").Note: I could not execute the full test run in the sandbox (missing Python deps like pyboy/openai cause a collection-time import failure unrelated to this fix). The solution therefore cites the measured numbers from the problem/commit (3825 passed / 8 skipped / 62 deselected in ~68s, full suite 3881 passed / 14 skipped in ~180s) and includes the exact markers, commands, a measurement-first step (--durations=25), and a check-list covering the -k gameplay / registration pitfalls.
# Evidence - Problem class: pytest-fast-subset-unmarked-heavy-classes - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-16T18:51:02.881Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "A documented pytest 'fast subset' command (e.g. -m 'not integration') takes >90s and barely progresses, because heavy test classes run UNMARKED so the exclusion marker excludes nothing. Solved 2026-08-16 in ai_plays_poke (GAP-026, commit 0f35360): root cause was NOT the obvious integration file (tests/test_integration.py was only 10.2s of the suite) but OTHER unmarked heavy tests (network retry/backoff classes ~12s each, memory/performance benchmarks ~11s, RAM scanning ~9s, mode-duration ~9s, API retry tests). Fix: measure first (pytest --durations or timing), then mark ALL heavy classes with @pytest.mark.slow (class-level for retry/perf classes, function-level for isolated slow tests) plus @pytest.mark.integration for component-flow classes; document the combined command .venv/bin/python -m pytest tests/ -q -m 'not integration and not slow' with measured runtimes in README. Result: 3825 passed/8 skipped/62 deselected in 68s (85s under host load), full suite unchanged 3881 passed/14 skipped in ~180s. Pitfall: a '-k gameplay' alternative does NOT work when slow tests are not gameplay-marked; verify the marker registration exists in pyproject.toml [tool.pytest.ini_options].", "environment": "", "language": "python", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "pytest-fast-subset-unmarked-heavy-classes", "provider": "openrouter", "solved_at": "2026-08-16T18:51:02.882Z", "version": ""}