aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/test.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-03-29 21:09:43 +0000
committerPJ Eby <distutils-sig@python.org>2006-03-29 21:09:43 +0000
commit281fa7d067f8cfcf7a1a5203f03091c25c976a42 (patch)
treee1bd44f63e974332ccf6c75ec40b4a689e682e53 /setuptools/command/test.py
parent4da195dc370305433ac4f448c647af8d9fa3691d (diff)
downloadexternal_python_setuptools-281fa7d067f8cfcf7a1a5203f03091c25c976a42.tar.gz
external_python_setuptools-281fa7d067f8cfcf7a1a5203f03091c25c976a42.tar.bz2
external_python_setuptools-281fa7d067f8cfcf7a1a5203f03091c25c976a42.zip
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
Diffstat (limited to 'setuptools/command/test.py')
-rw-r--r--setuptools/command/test.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/command/test.py b/setuptools/command/test.py
index 30226866..0370e372 100644
--- a/setuptools/command/test.py
+++ b/setuptools/command/test.py
@@ -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"""