Merge pull request #9111 from ziebam/iss4320-better-docs-for-testdir-copy-example
This commit is contained in:
commit
f50652a5d2
1
AUTHORS
1
AUTHORS
|
@ -224,6 +224,7 @@ Michael Goerz
|
||||||
Michael Krebs
|
Michael Krebs
|
||||||
Michael Seifert
|
Michael Seifert
|
||||||
Michal Wajszczuk
|
Michal Wajszczuk
|
||||||
|
Michał Zięba
|
||||||
Mihai Capotă
|
Mihai Capotă
|
||||||
Mike Hoyle (hoylemd)
|
Mike Hoyle (hoylemd)
|
||||||
Mike Lundy
|
Mike Lundy
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Improved docs for `pytester.copy_example`.
|
|
@ -416,7 +416,12 @@ return a result object, with which we can assert the tests' outcomes.
|
||||||
result.assert_outcomes(passed=4)
|
result.assert_outcomes(passed=4)
|
||||||
|
|
||||||
|
|
||||||
Additionally it is possible to copy examples for an example folder before running pytest on it.
|
Additionally it is possible to copy examples to the ``pytester``'s isolated environment
|
||||||
|
before running pytest on it. This way we can abstract the tested logic to separate files,
|
||||||
|
which is especially useful for longer tests and/or longer ``conftest.py`` files.
|
||||||
|
|
||||||
|
Note that for ``pytester.copy_example`` to work we need to set `pytester_example_dir`
|
||||||
|
in our ``pytest.ini`` to tell pytest where to look for example files.
|
||||||
|
|
||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue