summaryrefslogtreecommitdiff
path: root/setuptools/tests/__init__.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2013-06-15 15:34:53 +0100
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2013-06-15 15:34:53 +0100
commiteadbbe9dc803211495247233160426e4249d682f (patch)
treef0adb2eac5ae0653756b4f92053c08173e58735c /setuptools/tests/__init__.py
parent11194d70c12a5e302a091c629b4e3bae690e28d7 (diff)
downloadpython-setuptools-bitbucket-eadbbe9dc803211495247233160426e4249d682f.tar.gz
Initial commit. All tests pass on 2.7, 3.2 and 3.3, though there are some atexit errors in the multiprocessing module in 2.7/3.2 (seemingly unrelated to setuptools).
Diffstat (limited to 'setuptools/tests/__init__.py')
-rw-r--r--setuptools/tests/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/setuptools/tests/__init__.py b/setuptools/tests/__init__.py
index b6988a08..cb26a052 100644
--- a/setuptools/tests/__init__.py
+++ b/setuptools/tests/__init__.py
@@ -10,6 +10,7 @@ from distutils.errors import DistutilsSetupError
from distutils.core import Extension
from distutils.version import LooseVersion
+from setuptools.compat import func_code
import setuptools.dist
import setuptools.depends as dep
from setuptools import Feature
@@ -53,17 +54,18 @@ class DependsTests(unittest.TestCase):
x = "test"
y = z
+ fc = func_code(f1)
# unrecognized name
- self.assertEqual(dep.extract_constant(f1.func_code,'q', -1), None)
+ self.assertEqual(dep.extract_constant(fc,'q', -1), None)
# constant assigned
- self.assertEqual(dep.extract_constant(f1.func_code,'x', -1), "test")
+ self.assertEqual(dep.extract_constant(fc,'x', -1), "test")
# expression assigned
- self.assertEqual(dep.extract_constant(f1.func_code,'y', -1), -1)
+ self.assertEqual(dep.extract_constant(fc,'y', -1), -1)
# recognized name, not assigned
- self.assertEqual(dep.extract_constant(f1.func_code,'z', -1), None)
+ self.assertEqual(dep.extract_constant(fc,'z', -1), None)
def testFindModule(self):
self.assertRaises(ImportError, dep.find_module, 'no-such.-thing')