Pirate Wiki Docs
Alpine.jsData WarehouseDjangoDockerDjango REST FrameworkpytestPythonRustStreamlitSwiftTypeScriptVue.js
pytest
    • Introduction
    • Installation
    • Target Specific Tests
    • Filters, Markers & Expected Exceptions
    • Parametrized Testing
    • Introduction
    • Sharing
    • Scope
    • Extending and Renaming
    • Parametrizing
      • Introduction
      • request
      • tmp_path
      • pytestconfig
      • cache
      • capsys
      • caplog
      • monkeypatch
    • Plugins
    • Configuration
    • Introduction
    • pdb
    • Coverage.py
    • mock
    • unittest
    • tox
    • Jenkins CI
    • Version Info
    • References
pytest

Using pytest with Other Tools

pytest is rarely used in isolation. In most real-world testing environments, it acts as a central test runner while integrating smoothly with debugging tools, coverage analyzers, mocking libraries, environment managers and even other testing frameworks. This interoperability is one of pytest’s strongest advantages.

Configuration

pytest allows you to customize its behavior through configuration files. These settings control test discovery, default command-line options, custom markers, plugins and more. Configuration is typically defined in a pytest.ini file placed at the project root. You may also put pytest settings inside tox.ini if you are using tox (a tool that automates testing across multiple isolated virtual environments).

pdb

pytest integrates naturally with Python’s built-in debugger, pdb, making it easy to inspect failing tests interactively. When a test fails, you can instruct pytest to drop into a debugging session at the point of failure.

© 2021-2026 Dev Pirates