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 24, 2023
1 parent a0cb49b commit aa6237d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,13 @@ The :obj:`current` special object

A special singleton object which, when used during execution of a
parametrized test method, provides (in a `thread-local`_ manner)
access to the following properties of the currently executed test:
access to the following properties of the (currently executed) test:

.. attribute:: current.label

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

.. attribute:: current.context_targets

Expand All @@ -234,7 +235,7 @@ The :obj:`current` special object

:type: :class:`int`
:value: the consecutive number (within a single application of
:func:`@expand`) of the generated parametrized test method
:func:`expand`) of the generated parametrized test method

.. attribute:: current.base_name

Expand All @@ -243,7 +244,7 @@ The :obj:`current` special object

.. attribute:: current.base_obj

:type: :class:`function <types.FunctionType>`
:type: :data:`function <types.FunctionType>`
:value: the original (non-parametrized) test method itself

.. _thread-local: https://docs.python.org/library/threading.html#thread-local-data
Expand Down
4 changes: 2 additions & 2 deletions unittest_expander.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@
...Ran 4 tests...
OK
.. _`test-context-targets`
.. _test-context-targets
As you can see in the above example, a *sequence* of context manager
*as-targets* (i.e., objects returned by context managers'
Expand Down Expand Up @@ -1649,7 +1649,7 @@
* ``{label}`` -- the test label (automatically generated or
explicitly specified with :meth:`param.label`),
* ``{count}`` -- the consecutive number (within a single application
of :func:`@expand`) of the generated parametrized test method;
of :func:`expand`) of the generated parametrized test method;
(in future versions of *unittest_expander* more replacement fields may
be made available)
Expand Down

0 comments on commit aa6237d

Please sign in to comment.