diff options
| author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-06-20 22:55:16 +0100 |
|---|---|---|
| committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-06-20 22:55:16 +0100 |
| commit | 58a658b26d1c95b31d02050dcccd648d2e4ce27b (patch) | |
| tree | b9d3e7de6f6d23b91a7afecde3491e99d8cc7069 /setuptools/tests/__init__.py | |
| parent | e63f3e7d864b26529d6b197e053b4084be20decf (diff) | |
| download | python-setuptools-git-58a658b26d1c95b31d02050dcccd648d2e4ce27b.tar.gz | |
Changes to support 2.x and 3.x in the same codebase.
--HG--
branch : distribute
extra : rebase_source : 7d3608edee54a43789f0574d702fb839628b5071
Diffstat (limited to 'setuptools/tests/__init__.py')
| -rw-r--r-- | setuptools/tests/__init__.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py index 9af44a88..669bb826 100644 --- a/setuptools/tests/__init__.py +++ b/setuptools/tests/__init__.py @@ -7,6 +7,7 @@ import setuptools, setuptools.dist from setuptools import Feature from distutils.core import Extension extract_constant, get_module_constant = None, None +from setuptools.compat import func_code from setuptools.depends import * from distutils.version import StrictVersion, LooseVersion from distutils.util import convert_path @@ -50,17 +51,18 @@ class DependsTests(TestCase): x = "test" y = z + fc = func_code(f1) # unrecognized name - self.assertEqual(extract_constant(f1.func_code,'q', -1), None) + self.assertEqual(extract_constant(fc,'q', -1), None) # constant assigned - self.assertEqual(extract_constant(f1.func_code,'x', -1), "test") + self.assertEqual(extract_constant(fc,'x', -1), "test") # expression assigned - self.assertEqual(extract_constant(f1.func_code,'y', -1), -1) + self.assertEqual(extract_constant(fc,'y', -1), -1) # recognized name, not assigned - self.assertEqual(extract_constant(f1.func_code,'z', -1), None) + self.assertEqual(extract_constant(fc,'z', -1), None) def testFindModule(self): |
