nose-devs/nose — pull request #797 by jszakmeister (2014-04-20 12:45:48+00:00)
Title: Fix #711 and #506: ContextSuite is being passed to addError()

The core issue is that when class and module-level setup and teardown
occurs, we have no test case to associate with it. As a result, the
ContextSuite itself was being passed to addError(), but that's a
violation of the plugin API. Instead, let's create a Test specifically
for coping with errors in the setup and teardown, and try to scope it to
give user's useful feedback about what failed.

This changed when the prepareTestResult() method is called, so the test
was updated.