qa-unit-tests-python
Python unit testing per-framework wrappers: 5 skills (doctest-tests, nose2-tests, pytest-asyncio-patterns, pytest-tests, unittest-tests) and 1 agent (python-test-author).
Install this plugin
/plugin install qa-unit-tests-python@testland-qaPart of role bundle: qa-role-sdet
qa-unit-tests-python
Python unit testing in one umbrella skill: pytest as the primary framework, with stdlib unittest and doctest as bundled references, plus a standalone skill for async testing with pytest-asyncio.
Per-framework lifecycle scope. Does not duplicate qa-test-review (test code hygiene).
Components
| Type | Name | Description |
|---|---|---|
| Skill | python-unit-tests | pytest fixtures / parametrize / markers / config / mocking / coverage / CI, framework choice, and test-authoring conventions; references cover stdlib unittest (+unittest.mock) and doctest |
| Skill | pytest-asyncio-patterns | Async testing with pytest-asyncio: markers, loop scope, AsyncMock, FastAPI/aiohttp clients. |
Install
/plugin marketplace add testland/qa
/plugin install qa-unit-tests-python@testland-qaSkills
pytest-asyncio-patterns
Configures and runs async Python tests with pytest-asyncio: installs the plugin, selects asyncio_mode (auto vs strict), scopes event loops (function/class/module/session), writes async fixtures with @pytest_asyncio.fixture, mocks coroutines with AsyncMock, and tests FastAPI (httpx.AsyncClient + ASGITransport) and aiohttp (aiohttp_client fixture) applications. Use when a Python project contains async def test_ functions, FastAPI/aiohttp endpoints, or any asyncio-based code that needs pytest integration. Do NOT use for general pytest fixture design, parametrize patterns, or conftest.py structure without an asyncio-specific problem (event-loop scoping, mode config, AsyncMock, ASGI client): use python-unit-tests for those.
python-unit-tests
Python unit testing with pytest as the primary framework - fixtures (`@pytest.fixture` scopes, `conftest.py`), `@pytest.mark.parametrize` table-driven tests, markers (`skip` / `xfail` / custom with `--strict-markers`), `pyproject.toml` config, mocking via pytest-mock, coverage gating with pytest-cov (`--cov-fail-under`), parallel runs with pytest-xdist, and CI wiring - plus stdlib `unittest` (TestCase, unittest.mock, discovery) and `doctest` (docstring examples, directives) as references. Includes framework choice (pytest for new code; match an existing unittest convention; doctest only for documented examples) and test-authoring conventions (framework detection from pyproject.toml/setup.cfg/tox.ini, layout matching, no fabricated attributes). Use for any Python unit-test task: setting up pytest, writing fixtures or parametrized tests, mocking, gating coverage, wiring CI, or maintaining unittest/doctest suites. For async tests, see pytest-asyncio-patterns.