What problem does it solve? Python test suites often accumulate unittest.TestCase classes, for-loops inside tests, mis-scoped fixtures that leak state, and unregistered markers that pollute CI logs. This Skill codifies idiomatic pytest patterns so tests are isolated, discoverable, and compatible with pytest-asyncio, pytest-benchmark, and testcontainers-based integration testing. ## Core Features & Use Cases - Fixture and scope guidance: Rules for function/module/session scopes, yield-based cleanup, conftest.py placement, and avoiding mutable session-scoped state leaks. - Parametrization and markers: pytest.param with stable ids, indirect fixture parametrization, marker registration in pyproject.toml, and skip/xfail/skipif semantics. - Async and assertion tooling: asyncio_mode=auto configuration, monkeypatch for environment isolation, caplog/capsys/capfd capture, pytest.raises with match, and fakes-over-mocks guidance. - Use Case: When reviewing a pull request that adds a for-loop inside a test or a unittest.TestCase subclass, apply this Skill to rewrite it with @pytest.mark.parametrize and plain assert, then register any custom markers in pyproject.toml. ## Quick Start Review the test file tests/test_client.py and convert any unittest.TestCase classes and for-loops into idiomatic pytest with parametrized cases and properly scoped fixtures.