Toolverse
All skills

python-testing-patterns

by wshobson

Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
wshobson
Category
Testing
Views
146

About this skill

Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.

How to use

  1. Zainstaluj pytest w swoim środowisku Python: pip install pytest. Umiejętność dostarcza wzorce i praktyki testowania, które możesz natychmiast zastosować w swoim kodzie.

  2. Utwórz plik testowy o nazwie test_*.py lub *_test.py w katalogu projektu. Pytest automatycznie odkryje i uruchomi testy z takich plików.

  3. Napisz pierwszą funkcję testową, stosując wzorzec AAA (Arrange-Act-Assert): przygotuj dane testowe, wykonaj kod do testowania, a następnie sprawdź wynik za pomocą asercji.

  4. Uruchom testy poleceniem pytest w katalogu projektu. Umiejętność pokazuje, jak strukturować testy, aby były niezależne i izolowane od siebie.

  5. Rozwijaj testy stopniowo – zacznij od testów jednostkowych dla pojedynczych funkcji, a następnie dodaj testy integracyjne dla interakcji między komponentami. Wykorzystaj fixture'y do ponownego użytku kodu przygotowującego dane.

  6. Dla bardziej zaawansowanych scenariuszy stosuj mocki do testowania zależności zewnętrznych, testy asynchroniczne dla kodu współbieżnego i property-based testing dla bardziej kompleksowych warunków.

Related skills

lean4-theorem-proving

by cameronfreer

Use when developing Lean 4 proofs, facing type class synthesis errors, managing sorries/axioms, or searching mathlib - provides build-first workflow, instance management patterns (haveI/letI), and domain-specific tactics

Testing
9108

ad-creative

by alirezarezvani

When the user needs to generate, iterate, or scale ad creative for paid advertising. Use when they say 'write ad copy,' 'generate headlines,' 'create ad variations,' 'bulk creative,' 'iterate on ads,' 'ad copy validation,' 'RSA headlines,' 'Meta ad copy,' 'LinkedIn ad,' or

Testing
2863

polymarket-trader

by openclaw

Query Polymarket prediction markets - trending events, crypto, politics, sports, and search

Testing
14142

testing-workflow

by amo-tech-ai

Comprehensive testing workflow for E2E, integration, and unit tests. Use when testing applications layer-by-layer, validating user journeys, or running test suites.

Testing
1076

test-cases

by cexll

This skill should be used when generating comprehensive test cases from PRD documents or user requirements. Triggers when users request test case generation, QA planning, test scenario creation, or need structured test documentation. Produces detailed test cases covering

Testing
2862

pair-trade-screener

by tradermonty

Statistical arbitrage tool for identifying and analyzing pair trading opportunities. Detects cointegrated stock pairs within sectors, analyzes spread behavior, calculates z-scores, and provides entry/exit recommendations for market-neutral strategies. Use when user requests pair

Testing
994