
Get Started — pytest documentation
pytest will run all files of the form test_*.py or *_test.py in the current directory and its subdirectories. More generally, it follows standard test discovery rules.
Full pytest documentation
pytest features in unittest.TestCase subclasses Mixing pytest fixtures into unittest.TestCase subclasses using marks Using autouse fixtures and accessing other fixtures How to run tests written for nose …
Full pytest documentation
Full pytest documentation ¶ Download latest version as PDF Start here ¶ Get Started Install pytest Create your first test Run multiple tests Assert that a certain exception is raised Group multiple tests …
Examples and customization tricks - pytest documentation
Also, pytest on stackoverflow.com often comes with example answers. For basic examples, see Get Started for basic introductory examples How to write and report assertions in tests for basic assertion …
How-to guides - pytest documentation
pytest and other test systems ¶ How to use pytest with an existing test suite How to use unittest -based tests with pytest How to implement xunit-style set-up
pytest documentation
pytest: helps you write better programs ¶ The pytest framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries.
How to invoke pytest
In general, pytest is invoked with the command pytest (see below for other ways to invoke pytest). This will execute all tests in all files whose names follow the form test_*.py or \*_test.py in the current …
Usage and Invocations — pytest documentation
Usage and Invocations Calling pytest through python -m pytest ¶ You can invoke testing through the Python interpreter from the command line: python -m pytest [...] This is almost equivalent to invoking …
How to invoke pytest
In general, pytest is invoked with the command pytest (see below for other ways to invoke pytest). This will execute all tests in all files whose names follow the form test_*.py or \*_test.py in the current …
Basic patterns and examples — pytest documentation
How to change command line options defaults ¶ It can be tedious to type the same series of command line options every time you use pytest. For example, if you always want to see detailed info on …