Update CLI test suite to use subprocesses#176
Update CLI test suite to use subprocesses#176desertaxle merged 5 commits intoclaude/support-python-310-011CUQFhrhzXGxLGyRjXk8k9from
Conversation
|
Claude finished @desertaxle's task —— View job PR Review: Update CLI test suite to use subprocessesI've reviewed this PR that refactors the CLI test suite from using ✅ Strengths
🔍 Observations & Suggestions1. Security Considerations ✅The subprocess implementation appears secure:
2. Performance Impact
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## claude/support-python-310-011CUQFhrhzXGxLGyRjXk8k9 #176 +/- ##
====================================================================================
Coverage 100.00% 100.00%
====================================================================================
Files 33 34 +1
Lines 5103 5107 +4
Branches 263 264 +1
====================================================================================
+ Hits 5103 5107 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
CLI commands reject memory:// URLs since they don't persist across processes. This adds pytest skip markers to CLI tests and configures coverage exclusion for the memory backend testing environment. - Add pytest skip markers to CLI tests when REDIS_VERSION=memory - Create .coveragerc-memory with CLI exclusions for memory backend - Update CI to use --cov-config=.coveragerc-memory for memory backend - Set coverage threshold to 99% for memory backend (vs 100% for Redis) - Add comprehensive URL validation tests that run in all environments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
a16fcbe
into
claude/support-python-310-011CUQFhrhzXGxLGyRjXk8k9
Summary
This PR refactors the CLI test suite to use subprocess-based execution instead of Typer's in-process
CliRunner, improving test isolation and fixing test hangs that were occurring on Python 3.10.Changes
CLI Test Execution
tests/cli/utils.py): Implementsrun_cli()that spawnspython -m docketas a subprocessrun_cli()utility instead ofCliRunner.invoke()sitecustomize.pyMemory Backend Support
REDIS_VERSION=memorysince the CLI rejectsmemory://URLs.coveragerc-memoryto handle coverage for memory backend testsTest Reliability Improvements
Why These Changes?
The in-process
CliRunnerapproach was causing test hangs, particularly on Python 3.10. By running CLI commands in separate subprocesses: