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 nose.case.Test 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 nose.case.Test that they receive.
-
class
nose.proxy.
ResultProxy
(result, test, config=None)¶ Proxy to TestResults (or other results handler).
One ResultProxy is created for each nose.case.Test. The result proxy calls plugins with the nose.case.Test instance (instead of the wrapped test case) as each result call is made. Finally, the real result method is called, also with the nose.case.Test instance as the test parameter.
-
errors
¶ Tests that raised an exception
-
failures
¶ Tests that failed
-
shouldStop
¶ Should the test run stop?
-
testsRun
¶ 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 attributelocal_attr
.