diff options
| author | PJ Eby <distutils-sig@python.org> | 2006-03-28 22:40:57 +0000 |
|---|---|---|
| committer | PJ Eby <distutils-sig@python.org> | 2006-03-28 22:40:57 +0000 |
| commit | fb76e7210334ecbadcabfb1549e9df40c138b746 (patch) | |
| tree | 1f3e6cd64a6063145a55a56415756b01c6190c1e /setuptools/tests/__init__.py | |
| parent | c1294e1d0218322a1e3457897198837a071f2271 (diff) | |
| download | python-setuptools-git-fb76e7210334ecbadcabfb1549e9df40c138b746.tar.gz | |
Enhanced test loader to scan packages as well as modules, and call
``additional_tests()`` if present to get non-unittest tests.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4043412
Diffstat (limited to 'setuptools/tests/__init__.py')
| -rw-r--r-- | setuptools/tests/__init__.py | 53 |
1 files changed, 6 insertions, 47 deletions
diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 7009b321..ea469446 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -13,6 +13,12 @@ from distutils.version import StrictVersion, LooseVersion from distutils.util import convert_path import sys, os.path +def additional_tests(): + import doctest + return doctest.DocFileSuite( + 'api_tests.txt', optionflags=doctest.ELLIPSIS, package='pkg_resources', + ) + def makeSetup(**args): """Return distribution from 'setup(**args)', without executing commands""" @@ -33,12 +39,6 @@ def makeSetup(**args): - - - - - - class DependsTests(TestCase): def testExtractConst(self): @@ -367,44 +367,3 @@ class TestCommandTests(TestCase): -def test_api(): - import doctest - return doctest.DocFileSuite( - 'api_tests.txt', optionflags=doctest.ELLIPSIS, package='pkg_resources', - ) - - -testClasses = (DependsTests, DistroTests, FeatureTests, TestCommandTests) -testNames = ["setuptools.tests.test_resources", "setuptools.tests.test_api"] - -def test_suite(): - return TestSuite( - [makeSuite(t,'test') for t in testClasses]+ - [defaultTestLoader.loadTestsFromName(n) for n in testNames] - ) - - - - - - - - - - - - - - - - - - - - - - - - - - |
