Merge pull request #5195 from nicoddemus/pytest-config-docs

Add quick note about accessing config through session or item objects
This commit is contained in:
Anthony Sottile 2019-05-02 09:52:42 -07:00 committed by GitHub
commit b82e1b87cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ If you still have concerns about this deprecation and future removal, please com
The ``pytest.config`` global object is deprecated. Instead use The ``pytest.config`` global object is deprecated. Instead use
``request.config`` (via the ``request`` fixture) or if you are a plugin author ``request.config`` (via the ``request`` fixture) or if you are a plugin author
use the ``pytest_configure(config)`` hook. use the ``pytest_configure(config)`` hook. Note that many hooks can also access
the ``config`` object indirectly, through ``session.config`` or ``item.config`` for example.
.. _raises-warns-exec: .. _raises-warns-exec: