If :meth:`setUp` fails, meaning that :meth:`tearDown` is not called,
then any cleanup functions added will still be called.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. method:: doCleanups()
:meth:`doCleanups` pops methods off the stack of cleanup
functions one at a time, so it can be called at any time.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. class:: FunctionTestCase(testFunc, setUp=None, tearDown=None, description=None)
(for example when counting tests or comparing for equality)
so the tests returned must be the same for repeated iterations.
- .. versionchanged:: 2.7
+ .. versionchanged:: 3.2
In earlier versions the :class:`TestSuite` accessed tests directly rather
than through iteration, so overriding :meth:`__iter__` wasn't sufficient
for providing tests.
Called once before any tests are executed.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. method:: stopTestRun(test)
Called once before any tests are executed.
- .. versionadded:: 2.7
+ .. versionadded:: 3.2
.. method:: addError(test, err)
Calling ``main`` actually returns an instance of the ``TestProgram`` class.
This stores the result of the tests run as the ``result`` attribute.
- .. versionchanged:: 2.7
+ .. versionchanged:: 3.2
The ``exit`` parameter was added.