Pytest
Pytest is Python's industry-standard testing framework, built to handle the rigorous demands of customer support systems. This skill covers fixtures, parametrization, mocking, async operations, and database testing with PostgreSQL and SQLAlchemy—everything needed to test ticketing platforms, APIs, and multi-tenant architectures reliably.
Pytest helps you run and execute Python unit tests with fixtures, mocking, and async support for customer support systems.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-06-13
Pytest helps you run and execute Python unit tests with fixtures, mocking, and async support for customer support systems. Pytest is Python's industry-standard testing framework, built to handle the rigorous demands of customer support systems. This skill covers fixtures, parametrization, mocking, async operations, and database testing with PostgreSQL and SQLAlchemy—everything needed to test ticketing platforms, APIs, and multi-tenant architectures reliably.
Use it when
- Pytest fixtures are reusable test components defined with the @pytest.fixture decorator that provide setup and teardown logic.
- Pytest discovers tests automatically in files matching test_*.py or *_test.py patterns.
Install
manutej/luxor-claude-marketplace/pytest · repository language: Shell
generated, unverified - the skill's exact subdirectory could not be determined; check the repository on GitHub
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I run pytest for Python unit testing?
Pytest executes Python unit tests by discovering test files (test_*.py or *_test.py) in your project and running all test functions. Use `pytest` to run all tests, `pytest path/to/test.py` for specific files, or `pytest -k pattern` to filter by test name. Pytest's straightforward command-line interface makes it the industry standard for Python testing, especially in customer support systems where reliability is critical.
What are pytest fixtures and how do I use them?
Pytest fixtures are reusable test components defined with the @pytest.fixture decorator that provide setup and teardown logic. Fixtures handle database connections, mock objects, and test data initialization—essential for testing ticketing platforms and APIs. Pass fixture names as function parameters to inject them into tests. This approach eliminates boilerplate and ensures consistent test environments across your test suite.
How do I configure pytest markers and test discovery?
Pytest discovers tests automatically in files matching test_*.py or *_test.py patterns. Configure markers in pytest.ini or pyproject.toml to categorize tests (e.g., @pytest.mark.slow, @pytest.mark.integration). Use `pytest -m marker_name` to run specific test groups. This setup is vital for multi-tenant architectures where you need to separate unit tests, integration tests, and performance tests efficiently.
How can I generate test coverage reports with pytest?
Pytest generates coverage reports using the pytest-cov plugin. Install it with `pip install pytest-cov`, then run `pytest --cov=your_module --cov-report=html` to create an HTML coverage report. This shows which lines of code are tested, helping you identify gaps in test coverage for critical components like APIs and database operations in support systems.
What pytest command line options help debug failing tests?
Pytest offers several debugging options: `pytest -v` for verbose output, `pytest -s` to show print statements, `pytest --tb=short` for concise tracebacks, and `pytest --pdb` to drop into the debugger on failures. Use `pytest --lf` to rerun last failed tests or `pytest --ff` to run failed tests first. These tools help troubleshoot issues in ticketing platforms and complex test scenarios quickly.
How do I extend pytest with plugins and custom configurations?
Pytest extends through plugins installed via pip (e.g., pytest-asyncio for async testing, pytest-mock for mocking). Create a conftest.py file in your project root to define shared fixtures and custom hooks. Configure pytest behavior in pytest.ini, setup.cfg, or pyproject.toml. This flexibility lets you tailor Pytest to your specific needs—whether testing PostgreSQL databases, SQLAlchemy models, or multi-tenant architectures.
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Run and execute Python unit tests with pytest framework”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Learn to build robust test suites using pytest with fixtures at multiple scopes, parameterized test cases, and mocking strategies. This skill covers async testing patterns, FastAPI application testing, and property-based testing approaches to ensure comprehensive coverage and maintainable test code.
Customer Success equips you with patterns for support infrastructure: ticketing system integration, hybrid-search knowledge bases, AI-driven ticket triage, and escalation automation. It covers self-service portal design, SLA tracking, and feedback loops that surface product signals from support interactions.
Learn to build reliable Python tests using pytest, fixtures, mocking, and test-driven development. This skill covers test organization, naming conventions, retry logic, time control with freezegun, markers, and coverage reporting to help you write maintainable test suites.
Master pytest fundamentals through opinionated patterns: atomic tests that verify single behaviors, AAA structure (Arrange, Act, Assert), and descriptive naming that pinpoints failures. Learn when to parameterize variations, how to organize test files alongside modules, and when mocking belongs in integration tests instead.
Learn to structure Python tests using pytest, fixtures, parameterization, and mocking techniques. This skill covers unit and integration testing, test isolation, the AAA pattern, and debugging strategies to establish reliable test infrastructure.
Pytest Patterns teaches you to write reliable Python tests using pytest's core features—fixtures for setup and teardown, parametrization to run tests with multiple inputs, and mocking to isolate dependencies. Learn test organization, coverage analysis, and CI/CD integration to scale from simple unit tests to complex test suites.
More skills pytest-skill (MIT) · python-testing (MIT) · Alembic (unlicensed) · Test Frameworks (unlicensed) · Fastapi (unlicensed) · pytest (MIT) · Sqlalchemy (unlicensed) · python-testing (MIT)