{"enrichment":{"faq":[{"a":"pytest-skill teaches you to build production-grade tests using fixtures for setup/teardown and parametrize for data-driven testing. Fixtures provide reusable test components\u2014database connections, mock objects, temporary files\u2014while parametrize lets you run the same test logic across multiple input sets without code duplication. Together they enable clean, maintainable test suites.","q":"How to write pytest tests with fixtures and parametrize?"},{"a":"pytest-skill covers mocking external dependencies using unittest.mock or pytest-mock, organizing tests with markers (@pytest.mark.skip, @pytest.mark.xfail, custom markers), and centralizing fixture definitions in conftest.py. These patterns let you isolate units under test, skip tests conditionally, and share fixtures across your entire test suite without repetition.","q":"What pytest patterns cover mocking, markers, and conftest setup?"},{"a":"pytest-skill demonstrates assertion techniques using pytest's assert statement with clear messages, and exception handling via pytest.raises() context manager. You learn to verify both success paths and error conditions\u2014testing that functions raise expected exceptions with correct messages, ensuring your code fails gracefully and predictably.","q":"How do I write Python unit tests with proper assertion and exception handling?"},{"a":"pytest-skill shows how to configure pytest in pyproject.toml or pytest.ini for CI/CD pipelines: enabling coverage collection, defining custom markers for test categorization, setting output formats, and integrating with tools like pytest-cov. This enables automated testing, coverage reporting, and selective test execution in continuous integration workflows.","q":"How can pytest be configured for CI/CD with coverage and custom markers?"},{"a":"pytest-skill covers debugging failing tests using -vv verbosity, --pdb for interactive debugging, and --lf to rerun last failures. For optimization, it addresses test organization, parallel execution with pytest-xdist, fixture scoping to minimize setup overhead, and identifying slow tests to improve CI/CD performance.","q":"What does pytest-skill teach about debugging and optimizing test execution?"},{"a":"pytest-skill emphasizes production-ready patterns: organizing tests in conftest for shared fixtures, using markers for test categorization, implementing proper exception handling, mocking external APIs and databases, and configuring coverage thresholds. These practices ensure your test suite is maintainable, reliable, and catches regressions before deployment.","q":"How does pytest-skill help with best practices for production testing?"}],"shadow_tags":["test-automation","fixture-management","mock-patching","parametrized-testing","assertion-patterns","ci-cd-integration","async-testing","test-discovery","coverage-reporting","production-testing"],"summary_rewrite":"pytest-skill equips you with patterns for writing robust Python tests using pytest's core features: fixtures for setup and teardown, parametrize for data-driven testing, markers for test organization, and mocking for external dependencies. It covers conftest configuration, exception handling, and best practices for production environments."},"files":[{"bytes":4951,"path":"pytest-skill/SKILL.md","sha256":"771b4f0c803eec80b3c6682cdcb7f6561698ec0534261d893a5e41361a9d2fa2","url":"https://skillfed.io/files/LambdaTest/agent-skills/pytest-skill/145687f3/SKILL.md"}],"id":"LambdaTest/agent-skills/pytest-skill","links":{"html":"https://skillfed.io/LambdaTest/agent-skills/pytest-skill","md":"https://skillfed.io/LambdaTest/agent-skills/pytest-skill.md","repo":"https://github.com/LambdaTest/agent-skills"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":68,"language":"Python","last_updated":"2026-07-24","license":"MIT","name":"pytest-skill","publisher":"LambdaTest","stars":339},"relations":{"similar":[{"id":"xu-xiang/everything-claude-code-zh/python-testing"},{"id":"affaan-m/ECC/python-testing"},{"id":"xobotyi/cc-foundry/pytest"},{"id":"HermeticOrmus/LibreUIUX-Claude-Code/python-testing-patterns"},{"id":"JosiahSiegel/claude-plugin-marketplace/python-testing"},{"id":"bobmatnyc/claude-mpm-skills/pytest"},{"id":"hieutrtr/ai1-skills/pytest-patterns"},{"id":"manutej/luxor-claude-marketplace/pytest-patterns"},{"id":"Gentleman-Programming/Gentleman-Skills/pytest"},{"id":"prowler-cloud/prowler/pytest"}]},"slug":{"owner":"LambdaTest","repo":"agent-skills","skill":"pytest-skill"},"version":"145687f3"}
