Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
pytest documentation
Logo
  • Get Started
  • How-to guides
    • How to invoke pytest
    • How to write and report assertions in tests
    • How to use fixtures
    • How to mark test functions with attributes
    • How to parametrize fixtures and test functions
    • How to use temporary directories and files in tests
    • How to monkeypatch/mock modules and environments
    • How to run doctests
    • How to re-run failed tests and maintain state between test runs
    • How to handle test failures
    • Managing pytest’s output
    • How to manage logging
    • How to capture stdout/stderr output
    • How to capture warnings
    • How to use skip and xfail to deal with tests that cannot succeed
    • How to install and use plugins
    • Writing plugins
    • Writing hook functions
    • How to use pytest with an existing test suite
    • How to use unittest-based tests with pytest
    • How to implement xunit-style set-up
    • How to set up bash completion
  • Reference guides
    • API Reference
    • Fixtures reference
    • Configuration
    • Exit codes
    • Pytest Plugin List
  • Explanation
    • Anatomy of a test
    • About fixtures
    • Good Integration Practices
    • pytest import mechanisms and sys.path/PYTHONPATH
    • Typing in pytest
    • CI Pipelines
    • Flaky tests
  • Examples and customization tricks
    • Demo of Python failure reports with pytest
    • Basic patterns and examples
    • Parametrizing tests
    • Working with custom markers
    • A session-fixture which can look at all collected tests
    • Changing standard (Python) test discovery
    • Working with non-python tests
    • Using a custom directory collector

About the project

  • Changelog
  • Contributing
  • Backwards Compatibility Policy
  • History
  • Python version support
  • Sponsor
  • pytest for enterprise
  • License
  • Contact channels

Useful links

  • pytest @ PyPI
  • pytest @ GitHub
  • Issue Tracker
  • PDF Documentation
Back to top

Sponsor¶

pytest is maintained by a team of volunteers from all around the world in their free time. While we work on pytest because we love the project and use it daily at our daily jobs, monetary compensation when possible is welcome to justify time away from friends, family and personal time.

Money is also used to fund local sprints, merchandising (stickers to distribute in conferences for example) and every few years a large sprint involving all members.

OpenCollective¶

Open Collective is an online funding platform for open and transparent communities. It provide tools to raise money and share your finances in full transparency.

It is the platform of choice for individuals and companies that want to make one-time or monthly donations directly to the project.

See more details in the pytest collective.

Next
pytest for enterprise
Previous
Backwards Compatibility Policy
Copyright © 2015, holger krekel and pytest-dev team
Made with Sphinx and @pradyunsg's Furo
On this page
  • Sponsor
    • OpenCollective