diff options
author | Heng Liu <liucougar@gmail.com> | 2011-10-26 15:11:39 -0700 |
---|---|---|
committer | Heng Liu <liucougar@gmail.com> | 2011-10-26 15:11:39 -0700 |
commit | 7eb66b631fd32f5c40b870118fc1a1fd2a575869 (patch) | |
tree | d620839b74955ebd5b24c6f61059659b104e9c74 /nose | |
parent | 868ce889f1b6cf6423fdd56fbc90058c2f4895d8 (diff) | |
download | nose-7eb66b631fd32f5c40b870118fc1a1fd2a575869.tar.gz |
fixes Issue 462: class fixture are not properly handled in multiprocess. added
functional test coverage.
fixes Issue 465: properly tearDown multiprocess functional tests so all tests
will run.
Diffstat (limited to 'nose')
-rw-r--r-- | nose/plugins/multiprocess.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nose/plugins/multiprocess.py b/nose/plugins/multiprocess.py index 260cbf8..604752a 100644 --- a/nose/plugins/multiprocess.py +++ b/nose/plugins/multiprocess.py @@ -573,7 +573,7 @@ class MultiProcessTestRunner(TextTestRunner): for batch in self.nextBatch(case): yield batch - def checkCanSplit(self, context, fixt): + def checkCanSplit(context, fixt): """ Callback that we use to check whether the fixtures found in a context or ancestor are ones we care about. @@ -587,6 +587,7 @@ class MultiProcessTestRunner(TextTestRunner): if getattr(context, '_multiprocess_can_split_', False): return False return True + checkCanSplit = staticmethod(checkCanSplit) def sharedFixtures(self, case): context = getattr(case, 'context', None) @@ -755,7 +756,8 @@ class NoSharedFixtureContextSuite(ContextSuite): return try: localtests = [test for test in self._tests] - if len(localtests) > 1 and self.testQueue is not None: + if (not self.hasFixtures(MultiProcessTestRunner.checkCanSplit) + and len(localtests) > 1 and self.testQueue is not None): log.debug("queue %d tests"%len(localtests)) for test in localtests: if isinstance(test.test,nose.failure.Failure): |