Skip to content

Commit

Permalink
Docs: further fixes/improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
zuo committed Sep 26, 2023
1 parent f07cab7 commit d2cdc9e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,31 +211,33 @@ The :obj:`current` special object
.. attribute:: current.label

:type: :class:`str`
:value: the :ref:`test's label <test-labels>` (automatically
generated or explicitly specified with :meth:`param.label`)
:value: the :ref:`test's label <test-labels>` (which was
automatically generated or explicitly specified with
:meth:`param.label`...)

.. attribute:: current.context_targets

:type: :class:`~collections.abc.Sequence`
:value: the :ref:`test contexts' as-targets <test-context-targets>`
(i.e., objects returned by :meth:`__enter__` of each of the
context managers specified with :meth:`param.context`...)
context managers which were specified with
:meth:`param.context`...)

.. attribute:: current.all_args

:type: :class:`~collections.abc.Sequence`
:value: all *positional arguments* obtained by the currently
executed parametrized test method (in particular,
including all positional arguments passed to the
:class:`param` constructor)
including all positional arguments which were passed
to the :class:`param` constructor...)

.. attribute:: current.all_kwargs

:type: :class:`~collections.abc.Mapping`
:value: all *keyword arguments* obtained by the currently
executed parametrized test method (in particular,
including all keyword arguments passed to the
:class:`param` constructor)
including all keyword arguments which were passed
to the :class:`param` constructor...)

.. attribute:: current.count

Expand Down
4 changes: 2 additions & 2 deletions unittest_expander.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,8 +1510,8 @@
your test method definitions (instead of having your test methods
accepting ``label`` and/or ``context_targets`` as keyword arguments),
and switch :attr:`expand.legacy_signature_introspection` to
:obj:`False` (and, obviously, make sure your test code works
correctly with that).
:obj:`False` (and, obviously, make sure your tests work correctly
with that).
If the :attr:`expand.legacy_signature_introspection` global option is
:obj:`True` and a test method is able to accept the ``label`` keyword
Expand Down

0 comments on commit d2cdc9e

Please sign in to comment.