{"enrichment":{"faq":[{"a":"python-testing-patterns teaches you to build reliable unit tests using pytest, Python's leading testing framework. You'll learn to organize tests into logical suites, use assertions effectively, and structure test files for maintainability. The skill covers writing clear test cases that validate your code's behavior, implementing setup and teardown logic, and following testing best practices to catch bugs early in development.","q":"How to write unit tests in python with python-testing-patterns?"},{"a":"python-testing-patterns explains that pytest fixtures are reusable test components that provide data or resources to your tests. You'll learn to define fixtures in conftest.py files, scope them appropriately (function, class, module, or session), and use dependency injection to pass them into test functions. Fixtures handle setup and teardown automatically, reducing code duplication and making tests more maintainable and readable.","q":"What are pytest fixtures and how do I set them up?"},{"a":"python-testing-patterns covers mocking external dependencies and third-party services to isolate your tests from real API calls. You'll learn to use unittest.mock and pytest plugins to replace external calls with controlled substitutes, verify that your code calls dependencies correctly, and test error scenarios without hitting live services. This ensures tests run fast, reliably, and independently of external system availability.","q":"How can I mock external APIs in pytest?"},{"a":"python-testing-patterns teaches test-driven development by showing how to write tests before implementation code. You'll learn to set up test fixtures, define expected behavior through assertions, then write minimal code to pass tests. This workflow catches design issues early, ensures comprehensive coverage, and creates self-documenting code. The skill demonstrates how TDD improves code quality and reduces debugging time.","q":"What's the best approach to test-driven development in Python?"},{"a":"python-testing-patterns covers measuring test coverage to identify untested code paths. You'll learn to use coverage tools, interpret coverage reports, and set meaningful coverage targets. The skill shows how to identify gaps in your test suite, prioritize testing high-risk areas, and incrementally improve coverage. Understanding coverage metrics helps you build more robust applications and catch edge cases.","q":"How do I measure and improve test coverage in Python projects?"},{"a":"Yes, python-testing-patterns covers advanced testing patterns including async code testing with pytest-asyncio and property-based testing using Hypothesis. You'll learn to test asynchronous functions, handle concurrent operations in tests, and use property-based approaches to generate test cases automatically. These techniques catch subtle bugs in complex code that traditional unit tests might miss.","q":"Can python-testing-patterns help with async code and property-based testing?"}],"shadow_tags":["test-automation","quality-assurance","continuous-integration","code-validation","behavior-verification","dependency-isolation","assertion-framework","test-infrastructure"],"summary_rewrite":"Learn to build reliable test suites in Python using pytest, fixtures, and mocking strategies. This skill covers unit and integration testing, test organization, async testing, and coverage measurement. Discover patterns for parametrized tests, external dependency mocking, and test-driven development workflows."},"files":[{"bytes":6655,"path":"skills/python-testing-patterns/SKILL.md","sha256":"a1fdea82fb2c261b08750c949d74a504a7417e8eaceedef6d9564095307b181f","url":"https://skillfed.io/files/NickCrew/Claude-Cortex/python-testing-patterns/f1b02200/SKILL.md"}],"id":"NickCrew/Claude-Cortex/python-testing-patterns","links":{"html":"https://skillfed.io/NickCrew/Claude-Cortex/python-testing-patterns","md":"https://skillfed.io/NickCrew/Claude-Cortex/python-testing-patterns.md","repo":"https://github.com/NickCrew/Claude-Cortex"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":13,"language":"Python","last_updated":"2026-06-29","license":"MIT","name":"python-testing-patterns","publisher":"NickCrew","stars":23},"relations":{"similar":[{"id":"pluginagentmarketplace/custom-plugin-python/pytest-testing"},{"id":"wshobson/agents/python-testing-patterns"},{"id":"HermeticOrmus/LibreUIUX-Claude-Code/python-testing-patterns"},{"id":"manutej/luxor-claude-marketplace/pytest-patterns"},{"id":"xu-xiang/everything-claude-code-zh/python-testing"},{"id":"bobmatnyc/claude-mpm-skills/pytest"},{"id":"affaan-m/ECC/python-testing"},{"id":"JosiahSiegel/claude-plugin-marketplace/python-testing"},{"id":"xobotyi/cc-foundry/pytest"},{"id":"dawiddutoit/custom-claude/pytest-configuration"}]},"slug":{"owner":"NickCrew","repo":"Claude-Cortex","skill":"python-testing-patterns"},"version":"f1b02200"}
