Want to help improve pytest? Please contribute to or join our upcoming sprint in June 2016!

Navigation

  • next
  • previous |
  • pytest-2.9.2 »

Getting started basicsΒΆ

  • Installation and Getting Started
    • Installation
    • Our first test run
    • Running multiple tests
    • Asserting that a certain exception is raised
    • Grouping multiple tests in a class
    • Going functional: requesting a unique temporary directory
    • Where to go next
    • Known Installation issues
  • Usage and Invocations
    • Calling pytest through python -m pytest
    • Getting help on version, option names, environment variables
    • Stopping after the first (or N) failures
    • Specifying tests / selecting tests
    • Modifying Python traceback printing
    • Dropping to PDB (Python Debugger) on failures
    • Setting a breakpoint / aka set_trace()
    • Profiling test execution duration
    • Creating JUnitXML format files
    • Creating resultlog format files
    • Sending test report to online pastebin service
    • Disabling plugins
    • Calling pytest from Python code
  • Good Integration Practices
    • Conventions for Python test discovery
    • Choosing a test layout / import rules
    • Tox
    • Integrating with setuptools / python setup.py test / pytest-runner
    • (deprecated) Create a pytest standalone script
  • Project examples
    • Some organisations using pytest
  • Some Issues and Questions
    • On naming, nosetests, licensing and magic
    • pytest fixtures, parametrized tests
    • pytest interaction with other packages

Logo

Table Of Contents

  • Home
  • Contents
  • Install
  • Examples
  • Customize
  • Contact
  • Talks/Posts
  • Changelog
  • License

Related Topics

  • Documentation overview
    • Previous: Full pytest documentation
    • Next: Installation and Getting Started

Useful Links

  • Sprint funding campaign
  • The pytest Website
  • Contribution Guide
  • pytest @ PyPI
  • pytest @ GitHub
  • 3rd party plugins
  • Issue Tracker
  • PDF Documentation

Quick search

Enter search terms or a module, class or function name.

© Copyright 2015, holger krekel and pytest-dev team. Created using Sphinx.