fix(#201): Fix PytestReturnNotNoneWarning in harvest prompt tests #207

Merged
Rockachopa merged 3 commits from fix/201-pytest-warnings into main 2026-04-21 15:21:05 +00:00
Owner

Closes #201.

Problem

pytest scripts/test_*.py emitted 6 PytestReturnNotNoneWarning warnings because helper functions were named test_* and returned (bool, str) tuples instead of using assertions.

Fix

scripts/test_harvest_prompt_comprehensive.py (rewritten):

  • Renamed 5 test_* helper functions to check_* (check_prompt_structure, check_confidence_scoring, check_example_quality, check_constraint_coverage, check_test_sessions)
  • Added 5 proper pytest-compatible test_* functions that call the check helpers and assert the results
  • Standalone runner preserved via __main__ block

scripts/test_harvest_prompt.py: No changes needed -- it has no test_* functions that return values.

Verification

$ python3 -m pytest scripts/test_harvest_prompt.py scripts/test_harvest_prompt_comprehensive.py -v
# No PytestReturnNotNoneWarning
Closes #201. ## Problem `pytest scripts/test_*.py` emitted 6 PytestReturnNotNoneWarning warnings because helper functions were named `test_*` and returned `(bool, str)` tuples instead of using assertions. ## Fix **scripts/test_harvest_prompt_comprehensive.py** (rewritten): - Renamed 5 `test_*` helper functions to `check_*` (check_prompt_structure, check_confidence_scoring, check_example_quality, check_constraint_coverage, check_test_sessions) - Added 5 proper pytest-compatible `test_*` functions that call the check helpers and `assert` the results - Standalone runner preserved via `__main__` block **scripts/test_harvest_prompt.py**: No changes needed -- it has no `test_*` functions that return values. ## Verification ``` $ python3 -m pytest scripts/test_harvest_prompt.py scripts/test_harvest_prompt_comprehensive.py -v # No PytestReturnNotNoneWarning ```
Rockachopa added 3 commits 2026-04-17 05:21:03 +00:00
Rockachopa merged commit 4181065f60 into main 2026-04-21 15:21:05 +00:00
Sign in to join this conversation.