{"enrichment":{"faq":[{"a":"Python Testing teaches you to structure unit tests using the AAA pattern (Arrange, Act, Assert) with pytest. Start by organizing test files in a `tests/` directory, naming them `test_*.py`. Use descriptive test function names like `test_function_returns_expected_value()`. Python Testing covers proper assertions, test isolation, and how to leverage pytest's discovery mechanism to automatically find and run your tests.","q":"How do I write pytest tests in Python following best practices?"},{"a":"Python Testing explains that fixtures are reusable test components defined with `@pytest.fixture` that provide setup and teardown logic. They enable test isolation by giving each test its own clean state. You can scope fixtures as `function`, `class`, `module`, or `session` depending on your needs. Python Testing shows how to use `conftest.py` to share fixtures across test modules and combine multiple fixtures in a single test.","q":"What are pytest fixtures and how do I use them for test isolation?"},{"a":"Python Testing demonstrates mocking strategies using `unittest.mock` and pytest plugins. You can patch external calls with `@patch` decorators or use fixtures that return mock objects. Python Testing covers when to mock (external APIs, databases, file systems) versus when to use real objects, helping you avoid common anti-patterns and maintain fast, reliable tests that don't depend on external services.","q":"How do I mock external dependencies with pytest?"},{"a":"Python Testing covers async testing patterns using pytest-asyncio. Mark async test functions with `@pytest.mark.asyncio` and use `async def` syntax. Python Testing shows how to test coroutines, manage event loops, and structure fixtures for async workflows. It addresses timing issues and helps you validate that your async code behaves correctly under concurrent execution.","q":"How can I test asynchronous code with pytest-asyncio?"},{"a":"Python Testing guides you through configuring pytest in `pyproject.toml` under `[tool.pytest.ini_options]`. Key settings include `testpaths` (where to find tests), `python_files` (test file naming), `addopts` (default command-line options), and `markers` (custom test markers). Python Testing also covers coverage configuration, minimum thresholds, and how to integrate linting and formatting tools into your test pipeline.","q":"What pytest configuration options should I set in pyproject.toml?"},{"a":"Python Testing explains coverage setup using `pytest-cov`, which measures how much of your code your tests exercise. Configure coverage thresholds in `pyproject.toml` to fail builds below a target percentage. Python Testing shows how to generate HTML reports, identify untested code paths, and use coverage data to improve test suite quality and catch gaps in your test-driven development workflow.","q":"How do I set up test coverage reporting and enforce quality standards?"}],"shadow_tags":["test-framework","mock-isolation","coverage-metrics","async-validation","test-structure","ci-cd-testing","fixture-management","quality-gates","dependency-injection"],"summary_rewrite":"Python Testing guides you through pytest fundamentals, fixture management, and test-driven development for Python 3.9+ projects. It covers unit and integration testing, async validation, mocking strategies, and coverage configuration to help you build maintainable test suites that meet quality standards."},"files":[{"bytes":3305,"path":"plugins/parseltongue/skills/python-testing/SKILL.md","sha256":"b3d42f0e15061c28a2480e223557b201516e1e82345fe24bb18710c34065bbcc","url":"https://skillfed.io/files/athola/claude-night-market/python-testing/df119d10/SKILL.md"}],"id":"athola/claude-night-market/python-testing","links":{"html":"https://skillfed.io/athola/claude-night-market/python-testing","md":"https://skillfed.io/athola/claude-night-market/python-testing.md","repo":"https://github.com/athola/claude-night-market"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":29,"language":"Python","last_updated":"2026-07-27","license":"MIT","name":"python-testing","publisher":"athola","stars":323},"relations":{"similar":[{"id":"NickCrew/Claude-Cortex/python-testing-patterns"},{"id":"bobmatnyc/claude-mpm-skills/pytest"},{"id":"xu-xiang/everything-claude-code-zh/python-testing"},{"id":"athola/claude-night-market/pytest-config"},{"id":"cfircoo/claude-code-toolkit/pytest-best-practices"},{"id":"dawiddutoit/custom-claude/pytest-configuration"},{"id":"Mathews-Tom/armory/test-harness"},{"id":"existential-birds/beagle/pytest-code-review"},{"id":"xobotyi/cc-foundry/pytest"},{"id":"athola/claude-night-market/testing-quality-standards"}]},"slug":{"owner":"athola","repo":"claude-night-market","skill":"python-testing"},"version":"df119d10"}
