Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog/14164.improvement.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Exposed :class:`pytest.Approx` as the type of the return value of :func:`pytest.approx()`.
This can be used in type annotations and ``isinstance`` checks.
5 changes: 5 additions & 0 deletions doc/en/reference/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,11 @@ Objects
Objects accessible from :ref:`fixtures <fixture>` or :ref:`hooks <hook-reference>`
or importable from ``pytest``.

Approx
~~~~~~

.. autoclass:: pytest.Approx()
:members:

CallInfo
~~~~~~~~
Expand Down
Loading
Loading