Navigation
modules
next
|
previous
|
pytest-2.1.0
»
quicklinks
home
contents
install
changelog
examples
customize
issues[bb]
contact
Previous topic
Working with non-python tests
Next topic
pytest builtin helpers
py.test reference documentation
ΒΆ
pytest builtin helpers
builtin pytest.* functions and helping objects
builtin function arguments
basic test configuration
Command line options and configuration file settings
How test configuration is read from configuration INI-files
How to change command line options defaults
builtin configuration file options
The writing and reporting of assertions in tests
assert with the
assert
statement
assertions about expected exceptions
Making use of context-sensitive comparisons
Defining your own assertion comparison
Advanced assertion introspection
Injecting objects into test functions (funcargs)
Dependency injection through function arguments
The funcarg
request
object
Parametrizing multiple calls to a test function
extended xUnit style setup fixtures
module level setup/teardown
class level setup/teardown
method and function level setup/teardown
Capturing of the stdout/stderr output
Default stdout/stderr/stdin capturing behaviour
Setting capturing methods or disabling capturing
Using print statements for debugging
Accessing captured output from a test function
monkeypatching/mocking modules and environments
Simple example: patching
os.path.expanduser
Method reference of the monkeypatch function argument
xdist: pytest distributed testing plugin
Installation of xdist plugin
Usage examples
temporary directories and files
the ‘tmpdir’ test function argument
the default base temporary directory
skip and xfail: dealing with tests that can not succeed
Marking a test function to be skipped
skip all test functions of a class
mark a test function as expected to fail
evaluation of skipif/xfail expressions
imperative xfail from within a test or setup function
skipping on a missing import dependency
imperative skip from within a test or setup function
mark test functions with attributes
Marking a single function
Marking whole classes or modules
Using
-k
TEXT
to select tests
API reference for mark related objects
asserting deprecation and other warnings.
recwarn function argument
ensuring a function triggers a deprecation warning
unittest.TestCase support
Running test written for nose
Usage
Supported nose Idioms
Unsupported idioms / known issues
doctest integration for modules and test files
Navigation
modules
next
|
previous
|
pytest-2.1.0
»