diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2012-04-14 13:42:34 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2012-04-14 13:42:34 -0400 |
| commit | 7ac4947138f018b352743eff42270b5c0ad7d151 (patch) | |
| tree | b549223bfc2ec2cfc0c7359792bc29803d20d526 /setuptools/tests/__init__.py | |
| parent | e423ef803111e0760d6605fc0354a020c31e4f41 (diff) | |
| parent | e84148c579f9f11aedae2fe38762c819450038f6 (diff) | |
| download | python-setuptools-bitbucket-7ac4947138f018b352743eff42270b5c0ad7d151.tar.gz | |
Merge fixes for depends module imports. Fixes in part #277.
Diffstat (limited to 'setuptools/tests/__init__.py')
| -rw-r--r-- | setuptools/tests/__init__.py | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index db563766..207b4e0a 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -41,8 +41,6 @@ def makeSetup(**args): distutils.core_setup_stop_after = None - - class DependsTests(unittest.TestCase): def testExtractConst(self): @@ -51,7 +49,7 @@ class DependsTests(unittest.TestCase): return def f1(): - global x,y,z + global x, y, z x = "test" y = z @@ -67,11 +65,11 @@ class DependsTests(unittest.TestCase): # recognized name, not assigned self.assertEqual(dep.extract_constant(f1.func_code,'z', -1), None) - def testFindModule(self): self.assertRaises(ImportError, dep.find_module, 'no-such.-thing') self.assertRaises(ImportError, dep.find_module, 'setuptools.non-existent') - f,p,i = dep.find_module('setuptools.tests'); f.close() + f,p,i = dep.find_module('setuptools.tests') + f.close() def testModuleExtract(self): if not hasattr(dep, 'get_module_constant'): @@ -145,11 +143,9 @@ class DistroTests(unittest.TestCase): package_dir = {}, ) - def testDistroType(self): self.assert_(isinstance(self.dist,setuptools.dist.Distribution)) - def testExcludePackage(self): self.dist.exclude_package('a') self.assertEqual(self.dist.packages, ['b','c']) @@ -167,12 +163,6 @@ class DistroTests(unittest.TestCase): # test removals from unspecified options makeSetup().exclude_package('x') - - - - - - def testIncludeExclude(self): # remove an extension self.dist.exclude(ext_modules=[self.e1]) @@ -211,9 +201,6 @@ class DistroTests(unittest.TestCase): self.dist.exclude_package('c') self.assert_(not self.dist.has_contents_for('c')) - - - def testInvalidIncludeExclude(self): self.assertRaises(DistutilsSetupError, self.dist.include, nonexistent_option='x' @@ -242,19 +229,6 @@ class DistroTests(unittest.TestCase): ) - - - - - - - - - - - - - class FeatureTests(unittest.TestCase): def setUp(self): @@ -373,8 +347,3 @@ class TestCommandTests(unittest.TestCase): ts5 = makeSetup().get_command_obj('test') ts5.ensure_finalized() self.assertEqual(ts5.test_suite, None) - - - - - |
