python-testing
Python testing with pytest: fixtures, parametrization, mocking, test organization, async tests, Hypothesis, ExceptionGroup, free-threaded caveats, coverage, and CI hygiene. Use when writing or reviewing Python tests to improve correctness and reduce flakiness.
v2026.11.13-21cd5683 instalaciones+3 en 7 días39 EstrellasMITsincronizado hace 10 horas
Instalar
¿Aún no tienes la CLI de NotHoly? Instálala primero.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install aeondave/python-testingEscribe en ~/.notholy/skills después de comprobar la firma y el SHA-256.
FirmaFirmado, ed25519
Paquete27219579…d55c1b21
27219579d63d…c755d55c1b219 archivos · 5.7 KBEscaneoBajo1 hallazgo
- Enlaces a dominios externos
Fuentegithub.com/AeonDave/malskill/tree/main/coding/python-testing@21cd568
Esta entrada todavía no está escrita en tu idioma, así que aparece en English.
En esta página
High-signal guidance for writing tests that are deterministic, readable, and maintainable.
When to activate
- Adding tests (unit/integration) for new or existing code
- Refactoring tests to reduce flakiness
- Designing fixtures and test organization
- Adding coverage, CI checks, or async tests
- Property tests (Hypothesis) or concurrent/free-threaded suites
Outcome expectations
- Tests are deterministic and pass reliably in CI.
- Coverage is meaningful; assertions test behavior, not implementation details.
- Flaky tests are rare and quickly diagnosed (fixtures, mocking, timing).
- New developers can understand test intent within 30 seconds of reading.
Recommended triage workflow
For new code: Use test-driven-development when implementing test-first; it owns the loop and the entry points for existing code and refactors. Use this skill for pytest mechanics.
For flaky/failing tests:
- Check for shared state (mocks, fixtures, filesystem).
- Check for timing assumptions (avoid
sleep, use synchronization). - Check mock patch targets (patch as used, not where defined).
- Isolate to minimal reproduction in separate test.
Core rules
- Prefer small unit tests for logic; use integration tests for boundaries.
- Use pytest fixtures to remove duplication, but avoid fixture overengineering.
- Avoid sleeping in tests; synchronize via conditions/events.
- Mock at boundaries (network, time, DB), not everywhere.
- Coverage is a signal: aim for meaningful assertions, not line-hits.
- Do not add production hooks solely for tests; use real seams or dependency injection.
- Pair with
test-driven-developmentwhen implementing persistent code or bug fixes test-first. - If mocks, timing, or flakes dominate, pair with
testing-reliability; if the root cause is unclear, pair withsystematic-debugging. - Asyncio-heavy tests: also load
python-async-patternstesting.md. CancelledErrorandExceptionGroupare not caught bypytest.raises(Exception)/pytest.raises(ValueError)respectively.
Resources
Load on demand:
references/tdd-and-structure.md— load when naming and organizing tests; routes test-first work to the shared workflowreferences/fixtures-parametrize.md— fixtures (scopes, autouse), parametrization patternsreferences/mocking.md— unittest.mock, patching correctly, async mocksreferences/async.md— pytest-asyncio loop scope; cancellation/ExceptionGrouppointersreferences/concurrency.md— load for threads,InterpreterPoolExecutor, free-threaded suitesreferences/property.md— load when example tests miss a space Hypothesis can shrinkreferences/coverage-ci.md— pytest-cov, coverage hygiene, CI tipsreferences/commands.md— common pytest commands and selectors
Archivos de esta versión
references/89.6 KB
- async.md1.3 KB
- commands.md812 B
- concurrency.md2.1 KB
- coverage-ci.md989 B
- fixtures-parametrize.md1.2 KB
- mocking.md1.4 KB
- property.md952 B
- tdd-and-structure.md971 B
- SKILL.md3.4 KB
Permisos
| Permiso | Declarado | Hallado en el escaneo |
|---|---|---|
| Lee archivos | No | No |
| Escribe archivos | No | No |
| Ejecuta comandos de shell | Sí | Sí |
| Usa la red | Sí | Sí |
| Usa conectores | No | No |
| Controla un navegador | No | No |
Hallazgos del escaneo
Revisado el 13 nov 2026
- InfoEnlace · Enlaces a dominios externos
Un escaneo limpio baja el riesgo, pero no prueba que el paquete sea seguro. Lee lo que instalas.
| Versión | Publicada | Commit | SHA-256 | Firma | Cambio de permisos |
|---|---|---|---|---|---|
| v2026.11.13-21cd568 | 13 nov 2026 | 21cd568 | 27219579 | Firmada | – |
Más de AeonDave
Todo de este publicadorMás en Informes y cumplimiento
Ver la categoría- skillduty1g/skill5
- rea-ci-tests-auditmorluto/rea-ci-tests-audit4
- tracking-threat-actor-infrastructuremukul975/tracking-threat-actor-infrastructure4
- performing-authenticated-scan-with-openvasmukul975/performing-authenticated-scan-with-openvas4
- slicing-code-contexttrailofbits/slicing-code-context4
- 1337aeondave/13374
Pregunta todo lo que tu alcance permite.
Crea la cuenta, añade créditos y haz la primera pregunta en el chat o en la terminal.
- 1/3
Crea la cuenta
Individual o empresa. Puedes pasar a empresa después sin perder saldo ni claves.
IndividualEmpresa - 2/3
Añade créditos
Con tarjeta. Pagas por token, sin suscripción.
$5.00recarga mínima - 3/3
Pregunta
En el chat, o instala el CLI y ejecuta notholy login en tu terminal.
$ notholy login