ATOM-REFACTOR-20260119-001-pytest-test-discovery#168
ATOM-REFACTOR-20260119-001-pytest-test-discovery#168toolate28 merged 4 commits intocopilot/refine-prompt-toolkit-collaborationfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: toolate28 <105518313+toolate28@users.noreply.github.com>
…ot/sub-pr-156 Signed-off-by: toolated <toolated@pm.me>
🌀 Agent Review - Coherence Analysis🚨 Critical - Wave function collapse imminentOverall Coherence: NaN%📊 Detailed Metrics
📈 Analysis Summary
🔬 Ethical Quantum Simulation Status
|
…ot/sub-pr-156 Signed-off-by: toolated <toolated@pm.me>
🌀 Agent Review - Coherence Analysis🚨 Critical - Wave function collapse imminentOverall Coherence: NaN%📊 Detailed Metrics
📈 Analysis Summary
🔬 Ethical Quantum Simulation Status
|
fbd4b4e
into
copilot/refine-prompt-toolkit-collaboration
There was a problem hiding this comment.
Pull request overview
This PR refactors the TestAwiPromptGen test suite to make it compatible with pytest's test discovery mechanism. The original implementation used a custom test class without unittest.TestCase inheritance and a custom run_all() method, which prevented pytest from discovering the tests.
Changes:
- Converted class-based tests to 7 standalone
test_*functions compatible with pytest discovery - Replaced custom assertion framework with standard Python
assertstatements and descriptive error messages - Removed test infrastructure code (custom runner, counters,
if __name__ == "__main__"block)
| assert '\\n' in result.content or '\n injected' not in result.content, \ | ||
| "Newlines in intent should be escaped" |
There was a problem hiding this comment.
The error message "Newlines in intent should be escaped" is less informative than the original "Newlines in intent should be escaped or sanitized to prevent YAML injection". Consider restoring the more detailed message that explains the security rationale for this check.
Summary
The
TestAwiPromptGenclass was not discoverable by pytest because it lackedunittest.TestCaseinheritance and used a custom test runner instead of pytest conventions.ATOM Tag
ATOM:
ATOM-REFACTOR-20260119-001-pytest-test-discoveryWhy
Pytest test discovery requires either:
unittest.TestCase, ortest_*functionsThe custom class with
run_all()method bypassed pytest's discovery mechanism, making tests invisible to CI and manualpytestruns.What changed
test_*functionsself.test()assertions with standardassertstatements__init__,run_all(), pass/fail counters)Before:
After:
Verification / Testing
pytest --collect-onlypytest -vops/integrations/*/tests/test_*.pyClaude Interaction
You can interact with Claude in this PR by:
claude:review,claude:help,claude:analyzeExample commands:
@claude please review this PR for ATOM compliance@claude explain the changes in scripts/atom-track.sh@claude check for security issues@claude suggest improvementsNotes
Checklist
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.