diff options
author | Alec Warner <antarus@gentoo.org> | 2007-03-07 06:38:05 +0000 |
---|---|---|
committer | Alec Warner <antarus@gentoo.org> | 2007-03-07 06:38:05 +0000 |
commit | 60cb59d71dd75b9ae476a9c6b6363ca1ff77375e (patch) | |
tree | 3f5ef21ec57865225acf6ab195bed661d7fc88aa /pym/portage/tests/__init__.py | |
parent | f4eadc536e93cc9f429d249989a61b019c82d6bb (diff) | |
download | portage-60cb59d71dd75b9ae476a9c6b6363ca1ff77375e.tar.gz portage-60cb59d71dd75b9ae476a9c6b6363ca1ff77375e.tar.bz2 portage-60cb59d71dd75b9ae476a9c6b6363ca1ff77375e.zip |
Part of my attempt now involves cleaning up config; this means for me; removing the file-based stuff from it (config_path) and encapsulating that into classes. This is the first one, a simple PackageKeywords class that does file-based stuff, no recursion yet but soon. Trying to do TDD here as well,so tests first then code.
svn path=/main/trunk/; revision=6190
Diffstat (limited to 'pym/portage/tests/__init__.py')
-rw-r--r-- | pym/portage/tests/__init__.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/pym/portage/tests/__init__.py b/pym/portage/tests/__init__.py index 159e67b63..7d13af1e6 100644 --- a/pym/portage/tests/__init__.py +++ b/pym/portage/tests/__init__.py @@ -7,7 +7,7 @@ import os, unittest, time import portage.tests def main(): - testDirs = ["util","versions", "dep", "xpak"] + testDirs = ["util","versions", "dep", "xpak", "env/config"] suite = unittest.TestSuite() basedir = os.path.dirname(__file__) for mydir in testDirs: @@ -37,13 +37,10 @@ def getTests( path, base_path ): parent_module = parent_module.replace('/','.') result = [] for mymodule in files: - try: - # Make the trailing / a . for module importing - modname = ".".join((parent_module, mymodule)) - mod = my_import(modname) - result.append( unittest.TestLoader().loadTestsFromModule(mod) ) - except ImportError: - raise + # Make the trailing / a . for module importing + modname = ".".join((parent_module, mymodule)) + mod = my_import(modname) + result.append( unittest.TestLoader().loadTestsFromModule(mod) ) return result class TextTestResult(unittest._TextTestResult): @@ -87,6 +84,7 @@ class TestCase(unittest.TestCase): # _testMethodName. self._testMethodName = methodName unittest.TestCase.__init__(self, methodName) + self.todo = False def defaultTestResult(self): return TextTestResult() |