Commit 281fa7d0 authored by PJ Eby's avatar PJ Eby

Fix a problem with the test loader finding the bundled doctest's

TestCase subclasses and trying to run them, too.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4043425
parent 4da195dc
......@@ -13,8 +13,9 @@ class ScanningLoader(TestLoader):
If the module has an ``additional_tests`` function, call it and add
the return value to the tests.
"""
tests = [TestLoader.loadTestsFromModule(self,module)]
tests = []
if module.__name__!='setuptools.tests.doctest': # ugh
tests.append(TestLoader.loadTestsFromModule(self,module))
if hasattr(module, "additional_tests"):
tests.append(module.additional_tests())
......@@ -32,13 +33,12 @@ class ScanningLoader(TestLoader):
continue
tests.append(self.loadTestsFromName(submodule))
if len(tests)>1:
if len(tests)!=1:
return self.suiteClass(tests)
else:
return tests[0] # don't create a nested suite for only one return
class test(Command):
"""Command to run unit tests after in-place build"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment