Repository navigation
fix(tests): make test_jira.py collectable, add xdist/rerunfailures deps, add shared fixture - #1241
Conversation
…ps, add shared fixture Addresses issue #877 Parts B, C, D: B: Moved tests/test_jira.py to scripts/jira_smoke.py — it's a standalone argparse CLI that makes real Jira API calls, not a pytest suite. pytest --collect-only was finding it and reporting 0 items collected. C: Added pytest-xdist and pytest-rerunfailures to setup.py [dev] extras. CI commands not yet updated to use -n auto / --reruns (separate follow-up). D: Added shared mock_lemonade_client fixture to tests/conftest.py near the existing lemonade_available/require_lemonade fixtures.
|
Clean, well-scoped fix that unblocks CI collection without any functional risk. Two minor nits worth fixing before merge. SummaryMoving Issues Found🟢 Stale path in print statement (
|
The --list-tests rerun hint still pointed at the old tests/test_jira.py location, and the docstring example used a truncated method name.
SummaryClean, well-motivated housekeeping PR. Moving No blocking issues found. Issues Found🟢 Minor — Stale path reference in
|
itomek
left a comment
There was a problem hiding this comment.
Verified: both code nits from the earlier review are already fixed in head — grepped the PR-head scripts/jira_smoke.py and found zero remaining tests/test_jira references, and the docstring example uses the real method name test_basic_fetch_queries. The jira-agent.mdx:295 flag is a false positive — that's an illustrative "where unit tests would live" path in the spec, not a pointer to the moved smoke test. New deps (pytest-xdist, pytest-rerunfailures) are declared in setup.py. Approving.
Generated by Claude Code
pytest --collect-only tests/test_jira.pywas reporting 0 items because the file is a standalone argparse smoke-test script (real Jira API calls, own CLI flags, bool-returning methods) — not a pytest suite. Meanwhile,pytest-xdistandpytest-rerunfailureswere missing from dev deps, and every test file that needed aLemonadeClientmock was duplicating the same patch target.Closes #877 Parts B, C, D (Part A shipped in #1190).
Test plan
pytest --collect-only tests/test_jira.py→ "file or directory not found" (no longer in tests/)python scripts/jira_smoke.py --helpstill works (file moved, not deleted)grep -E "pytest-xdist|pytest-rerunfailures" setup.pyshows both depsgrep mock_lemonade_client tests/conftest.pyshows the shared fixturepytest --collect-only tests/conftest.pyparses without errors