Result Proxy

The result proxy wraps the result instance given to each test. It performs two functions: enabling extended error/failure reporting and calling plugins.

As each result event is fired, plugins are called with the same event; however, plugins are called with the instance that wraps the actual test. So when a test fails and calls result.addFailure(self, err), the result proxy calls addFailure(self.test, err) for each plugin. This allows plugins to have a single stable interface for all test types, and also to manipulate the test object itself by setting the test attribute of the that they receive.

class nose.proxy.ResultProxy(result, test, config=None)

Proxy to TestResults (or other results handler).

One ResultProxy is created for each The result proxy calls plugins with the instance (instead of the wrapped test case) as each result call is made. Finally, the real result method is called, also with the instance as the test parameter.


Tests that raised an exception


Tests that failed


Should the test run stop?


Number of tests run

class nose.proxy.ResultProxyFactory(config=None)

Factory for result proxies. Generates a ResultProxy bound to each test and the result passed to the test.

nose.proxy.proxied_attribute(local_attr, proxied_attr, doc)

Create a property that proxies attribute proxied_attr through the local attribute local_attr.