File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -233,3 +233,13 @@ was executed ahead of the ``test_method``.
233233 overwrite ``unittest.TestCase `` ``__call__ `` or ``run ``, they need to
234234 to overwrite ``debug `` in the same way (this is also true for standard
235235 unittest).
236+
237+ .. note ::
238+
239+ Due to architectural differences between the two frameworks, setup and
240+ teardown for ``unittest ``-based tests is performed during the ``call `` phase
241+ of testing instead of in ``pytest ``'s standard ``setup `` and ``teardown ``
242+ stages. This can be important to understand in some situations, particularly
243+ when reasoning about errors. For example, if a ``unittest ``-based suite
244+ exhibits errors during setup, ``pytest `` will report no errors during its
245+ ``setup `` phase and will instead raise the error during ``call ``.
You can’t perform that action at this time.
0 commit comments