Pular para o conteúdo
Novo

DeepSeek V4.1 Flash grátis por 7 dias: 10M tokens por dia após recarga de $10 ou mais. Até 30/11.

Como funciona
aeondave/python-testingRelatórios e compliance

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 instalações+3 em 7 dias39 EstrelasMITsincronizado há 10 horas

Instalar

Ainda não tem a CLI da NotHoly? Instale primeiro.

$ curl -fsSL https://notholy.com/install.sh | sh
$ notholy skills install aeondave/python-testing

Grava em ⁦~/.notholy/skills⁩ depois de conferir a assinatura e o SHA-256.

AssinaturaAssinado, ed25519
L1xLi8p/Rc…gAGFd7CQ==A CLI confere o SHA-256 e a assinatura antes de gravar qualquer arquivo.
Pacote27219579…d55c1b21
27219579d63d…c755d55c1b219 arquivos · ⁦5.7 KB⁩
VarreduraBaixo1 achado
  • Links para domínios externos
Ver a varredura completa
Fontegithub.com/AeonDave/malskill/tree/main/coding/python-testing@21cd568

Este item ainda não foi escrito no seu idioma, então aparece em English.

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.

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:

  1. Check for shared state (mocks, fixtures, filesystem).
  2. Check for timing assumptions (avoid sleep, use synchronization).
  3. Check mock patch targets (patch as used, not where defined).
  4. 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-development when 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 with systematic-debugging.
  • Asyncio-heavy tests: also load python-async-patterns testing.md.
  • CancelledError and ExceptionGroup are not caught by pytest.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 workflow
  • references/fixtures-parametrize.md — fixtures (scopes, autouse), parametrization patterns
  • references/mocking.md — unittest.mock, patching correctly, async mocks
  • references/async.md — pytest-asyncio loop scope; cancellation/ExceptionGroup pointers
  • references/concurrency.md — load for threads, InterpreterPoolExecutor, free-threaded suites
  • references/property.md — load when example tests miss a space Hypothesis can shrink
  • references/coverage-ci.md — pytest-cov, coverage hygiene, CI tips
  • references/commands.md — common pytest commands and selectors

Arquivos desta versão

Permissões

PermissãoDeclaradaEncontrada na varredura
Lê arquivosNãoNão
Grava arquivosNãoNão
Roda comandos no shellSimSim
Usa a redeSimSim
Usa conectoresNãoNão
Controla um navegadorNãoNão

Achados da varredura

Revisado em 13 de nov. de 2026

  1. InfoLink · Links para domínios externos

Uma varredura limpa reduz o risco, mas não prova que o pacote é seguro. Leia o que você instala.

VersãoPublicada emCommitSHA-256AssinaturaMudança de permissão
v2026.11.13-21cd56813 de nov. de 202621cd56827219579Assinada–

Pergunte tudo o que o seu escopo permite.

Crie a conta, adicione créditos e faça a primeira pergunta no chat ou no terminal.

  1. 1/3

    Crie a conta

    Individual ou empresa. Dá para virar empresa depois sem perder saldo nem chaves.

    Pessoa físicaEmpresa
  2. 2/3

    Adicione créditos

    No cartão. Você paga por token, sem assinatura.

    $5.00recarga mínima
  3. 3/3

    Pergunte

    No chat, ou instale o CLI e rode notholy login no terminal.

    $ notholy login