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
commit8e657eac1ef02faedca99df319fff6b63f4a4305 (patch)
treef3f2ed97342421c6b65c9caaab8ae5d830f04059 /setuptools/tests/__init__.py
parentc04abca662dcbffd00d928e06fbf32b9f49f8e57 (diff)
downloadpython-setuptools-git-8e657eac1ef02faedca99df319fff6b63f4a4305.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).
--HG-- branch : single-codebase
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')