scope
: the scope for which this fixture is shared, one of “function” (default), “class”, “module”, “session”.params
: an optional list of parameters which will cause multiple invocations of the fixture function and all of the tests using it.autouse
: if True, the fixture func is activated for all tests that can see it. If False (the default) then an explicit reference is needed to activate the fixture.ids
: list of string ids each corresponding to the params so that they are part of the test id. If no ids are provided they will be generated automatically from the params.
msg
: Reason why the test will be skipped.
condition
: Skip the test if the given condition is true.reason
: Reason why the test will be skipped
*fixturenames
: One or more fixture names to be loaded for the test.
The test function doesn't need a direct access to the fixture (object).
reason
: Reason why the test will be skipped
You expect a test to fail, e.g. due to implementation errors or known bugs.
expected_exception
Assert that a code block/function call raises expected_exception and raise a failure exception otherwise.
(in pytest 3: @pytest.fixture(yield=True)
)