DEV Community

郭帅 for Skillπ

Posted on AI-assisted

No test errors. All good?

Edited November 26, 2026 · SKILL NOTES 012

Cover

An agent finishes a change and says the tests are green. Ask what was collected, what actually ran, what was skipped, and which outcomes were expected to fail before treating that sentence as evidence.

This is a documentation-based explanation, not a live project test. pytest is a Python testing framework, not a standalone agent skill. The review steps can become part of a skill acceptance workflow.

Collection

Check collection first. Default pytest exit code 5 means no tests were collected. It is not an all-passed result. Record the actual command, working directory, selected paths and filters alongside the summary. A wrapper or plugin may change what the outer task reports, so inspect the actual test result.

Skipped

List skipped tests separately. Platform conditions and unavailable dependencies can justify a skip. A skipped check still supplies no passing evidence for that execution. Read its reason and explain which behavior remains unverified. Do not replace a required environment check with a skip just to obtain a green badge.

Expected outcomes

Separate XFAIL from XPASS. XFAIL records an expected failure; it is not proof of a fix. XPASS means a test unexpectedly passed. Under the default non-strict behavior, these outcomes do not by themselves fail the suite. Setting strict=True for an xfail mark makes its XPASS fail the suite, prompting review of the expectation or fix. Check the installed version, project configuration and plugins before changing policy.

Handoff

Ask the agent for a reviewable handoff:

Preserve the command, working directory, version and exit code. Report collected counts and the applicable passed, failed, skipped, xfailed and xpassed outcomes. Explain skipped and expected-failure reasons, and identify requirements without test coverage. Mark unexecuted checks as unverified. Do not change markers to hide failures.

The useful question is what the result establishes and what it leaves open. Passing existing tests does not guarantee complete requirements or correct production behavior. No dependencies were installed or project tests run for this article.

Explore workflows in the AI skills marketplace. Infinite Skills. Infinite Possibilities.

AI-assisted writing and AI-generated conceptual illustrations. The images are not real terminal output or test receipts.

Top comments (0)