diff options
author | Jason Pellerin <jpellerin@gmail.com> | 2007-03-26 19:36:29 +0000 |
---|---|---|
committer | Jason Pellerin <jpellerin@gmail.com> | 2007-03-26 19:36:29 +0000 |
commit | b1a91990216f11dc84a98278487be894869b5b39 (patch) | |
tree | a9074bc7cea3765a79c0fc751e285cbb095a6aa2 /nose/plugins/base.py | |
parent | 63880ec71d7460ec0b86f900882b214ac3185757 (diff) | |
download | nose-b1a91990216f11dc84a98278487be894869b5b39.tar.gz |
Work on integrating plugin calls, notes on result/proxy system.
Diffstat (limited to 'nose/plugins/base.py')
-rw-r--r-- | nose/plugins/base.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/nose/plugins/base.py b/nose/plugins/base.py index 03b33c4..7a8b475 100644 --- a/nose/plugins/base.py +++ b/nose/plugins/base.py @@ -303,6 +303,49 @@ class IPluginInterface(object): """ pass loadTestsFromTestCase.generative = True + + def prepareTestLoader(self, loader): + """Called before tests are loaded. To replace the test loader, + return a test loader. To allow other plugins to process the + test loader, return None. Only one plugin may replace the test + loader. Only valid when using nose.TestProgram. + + Parameters: + * loader: + the test loader + """ + pass + + def prepareTestResult(self, result): + """Called before the first test is run. To use a different + test result handler for all tests than the given result, + return a test result handler. NOTE however that this handler + will only be seen by tests, that is, inside of the result + proxy system. The TestRunner and TestProgram -- whether nose's + or other -- will continue to see the original result + handler. For this reason, it is usually better to monkeypatch + the result (for instance, if you want to handle TODO + exceptions in some way). Only one plugin may replace the + result, but many may monkeypatch it. If you want to + monkeypatch and stop other plugins from doing so, monkeypatch + and return the patched result. + + Parameters: + * result: + the test result + """ + pass + + def prepareTestRunner(self, runner): + """Called before tests are run. To replace the test runner, + return a test runner. To allow other plugins to process the + test runner, return None. Only valid when using nose.TesrProgram. + + Parameters: + * runner + the test runner + """ + pass def prepareTest(self, test): """Called before the test is run by the test runner. Please note |