Add Monkeypatch and tutorial links for logging
This commit is contained in:
parent
adcb28f61b
commit
215c6b281e
|
@ -547,8 +547,9 @@ def raises(expected_exception, *args, **kwargs):
|
|||
The string will be evaluated using the same ``locals()`` and ``globals()``
|
||||
at the moment of the ``raises`` call.
|
||||
|
||||
.. autoclass:: _pytest._code.ExceptionInfo
|
||||
:members:
|
||||
.. currentmodule:: _pytest._code
|
||||
|
||||
Consult the API of ``excinfo`` objects: :class:`ExceptionInfo`.
|
||||
|
||||
.. note::
|
||||
Similar to caught exception objects in Python, explicitly clearing
|
||||
|
|
|
@ -63,13 +63,9 @@ so that any attempts within tests to create http requests will fail.
|
|||
help although there's no guarantee.
|
||||
|
||||
|
||||
Method reference of the monkeypatch fixture
|
||||
-------------------------------------------
|
||||
.. currentmodule:: _pytest.monkeypatch
|
||||
|
||||
.. autoclass:: MonkeyPatch
|
||||
:members:
|
||||
|
||||
``monkeypatch.setattr/delattr/delitem/delenv()`` all
|
||||
by default raise an Exception if the target does not exist.
|
||||
Pass ``raising=False`` if you want to skip this check.
|
||||
API Reference
|
||||
-------------
|
||||
|
||||
Consult the docs for the :class:`MonkeyPatch` class.
|
||||
|
|
|
@ -196,6 +196,9 @@ Full reference to objects accessible from :ref:`fixtures <fixture>` or hooks
|
|||
:members:
|
||||
:show-inheritance:
|
||||
|
||||
.. autoclass:: _pytest._code.ExceptionInfo
|
||||
:members:
|
||||
|
||||
.. autoclass:: _pytest.nodes.FSCollector()
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
@ -427,10 +430,27 @@ record_xml_property
|
|||
caplog
|
||||
~~~~~~
|
||||
|
||||
**Tutorial**: :doc:`logging`.
|
||||
|
||||
.. autofunction:: _pytest.logging.caplog()
|
||||
:no-auto-options:
|
||||
|
||||
This returns a :class:`_pytest.logging.LogCaptureFixture`.
|
||||
This returns a :class:`_pytest.logging.LogCaptureFixture` instance.
|
||||
|
||||
.. autoclass:: _pytest.logging.LogCaptureFixture
|
||||
:members:
|
||||
|
||||
|
||||
monkeypatch
|
||||
~~~~~~~~~~~
|
||||
|
||||
**Tutorial**: :doc:`monkeypatch`.
|
||||
|
||||
.. autofunction:: _pytest.monkeypatch.monkeypatch()
|
||||
:no-auto-options:
|
||||
|
||||
This returns a :class:`_pytest.monkeypatch.MonkeyPatch` instance.
|
||||
|
||||
.. autoclass:: _pytest.monkeypatch.MonkeyPatch
|
||||
:members:
|
||||
|
||||
|
|
Loading…
Reference in New Issue