mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Adding versionadded to various new unittest functions in documentation
This commit is contained in:
parent
3939dcdb72
commit
47b5440f43
1 changed files with 8 additions and 0 deletions
|
@ -1873,6 +1873,8 @@ handling functionality within test frameworks.
|
||||||
(usually in response to the user pressing control-c) all registered results
|
(usually in response to the user pressing control-c) all registered results
|
||||||
have :meth:`~TestResult.stop` called.
|
have :meth:`~TestResult.stop` called.
|
||||||
|
|
||||||
|
.. versionadded:: 2.7
|
||||||
|
|
||||||
.. function:: registerResult(result)
|
.. function:: registerResult(result)
|
||||||
|
|
||||||
Register a :class:`TestResult` object for control-c handling. Registering a
|
Register a :class:`TestResult` object for control-c handling. Registering a
|
||||||
|
@ -1883,12 +1885,16 @@ handling functionality within test frameworks.
|
||||||
handling is not enabled, so test frameworks can unconditionally register
|
handling is not enabled, so test frameworks can unconditionally register
|
||||||
all results they create independently of whether or not handling is enabled.
|
all results they create independently of whether or not handling is enabled.
|
||||||
|
|
||||||
|
.. versionadded:: 2.7
|
||||||
|
|
||||||
.. function:: removeResult(result)
|
.. function:: removeResult(result)
|
||||||
|
|
||||||
Remove a registered result. Once a result has been removed then
|
Remove a registered result. Once a result has been removed then
|
||||||
:meth:`~TestResult.stop` will no longer be called on that result object in
|
:meth:`~TestResult.stop` will no longer be called on that result object in
|
||||||
response to a control-c.
|
response to a control-c.
|
||||||
|
|
||||||
|
.. versionadded:: 2.7
|
||||||
|
|
||||||
.. function:: removeHandler(function=None)
|
.. function:: removeHandler(function=None)
|
||||||
|
|
||||||
When called without arguments this function removes the control-c handler
|
When called without arguments this function removes the control-c handler
|
||||||
|
@ -1899,3 +1905,5 @@ handling functionality within test frameworks.
|
||||||
def test_signal_handling(self):
|
def test_signal_handling(self):
|
||||||
...
|
...
|
||||||
|
|
||||||
|
.. versionadded:: 2.7
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue