pytest

Run unittest-based Python test suites with pytest for filtering and coverage.

Updated May 17, 2026
One-click install
npx skills add https://github.com/cheetah-alo/NegritaOS --skill pytest-cheetah-alo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytest
Source: https://github.com/cheetah-alo/NegritaOS/tree/main/.codex/skills/pytest
Command: npx skills add https://github.com/cheetah-alo/NegritaOS --skill pytest-cheetah-alo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the need to execute, structure, and manage Python test suites using pytest for projects whose canonical tests are written with unittest.

Core Features & Use Cases

  • Auxiliary pytest runner for unittest suites: Use pytest to run existing unittest tests as a secondary runner, apply filters, or collect coverage without replacing the primary testing approach.
  • Consistent test structure and fixtures: Provide practical patterns for defining tests, reusable fixtures, fixture teardown, and fixture scopes to keep tests maintainable.
  • Common pytest capabilities: Support parametrization, markers (including skip/skipif), async tests, and useful execution commands for day-to-day engineering workflows.

Quick Start

Use the pytest skill when you already have unittest-based tests and want to run them with pytest as a filter or coverage wrapper (for example, selecting only tests related to user creation).

Frequently Asked Questions about pytest

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run existing unittest tests with pytest as a secondary runner?

To run unittest tests with pytest, use pytest as a secondary runner to execute and filter your existing test suites. This approach allows you to apply selection filters and collect coverage without replacing your primary unittest-based testing workflow.

What is the best way to structure reusable test fixtures in Python?

Structuring reusable test fixtures in Python involves defining practical patterns for fixture teardown and managing fixture scopes. This approach keeps your tests maintainable by providing consistent setup and teardown logic across your test suites.

How do I use markers to select or skip tests in pytest?

Using markers in pytest allows you to select or skip tests using skip and skipif conditions. This mechanism supports test selection for day-to-day engineering workflows, enabling you to filter and execute targeted subsets of your test suite.

Can I use pytest for parametrized assertions and async test support?

Yes, pytest supports parametrized assertions and async test execution. These capabilities, combined with convenient command-line execution, allow you to handle complex testing scenarios and organize your test suites efficiently.

Does pytest work with unittest-centered codebases without replacing them?

Yes, pytest works with unittest-centered codebases by acting as an auxiliary runner for filtering and coverage wrapping. It satisfies requirements for clear unittest-first governance by using pytest only to run, filter, or collect coverage rather than replacing the canonical tests.