aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authortarek <none@none>2009-07-22 17:58:08 +0200
committertarek <none@none>2009-07-22 17:58:08 +0200
commit2be8a41fed38f9375760d9322edcca5218db05d2 (patch)
treee0bc2b1f4bc65ebd7b0bc9267141e1096076a625 /tests
parentb0f0ee685ca525de90fdcd5a57a203c8b42b936a (diff)
downloadexternal_python_setuptools-2be8a41fed38f9375760d9322edcca5218db05d2.tar.gz
external_python_setuptools-2be8a41fed38f9375760d9322edcca5218db05d2.tar.bz2
external_python_setuptools-2be8a41fed38f9375760d9322edcca5218db05d2.zip
fixed import test
--HG-- branch : distribute extra : rebase_source : a007e84b35812190d3cb622d372b48c96634fc08
Diffstat (limited to 'tests')
-rw-r--r--tests/install_test.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/install_test.py b/tests/install_test.py
index 24490a3c..11fc2cb6 100644
--- a/tests/install_test.py
+++ b/tests/install_test.py
@@ -23,8 +23,22 @@ else:
os.spawnv(os.P_WAIT, sys.executable, args)
# now checking if Distribute is installed
+script = """\
+import sys
+try:
+ import setuptools
+except ImportError:
+ sys.exit(0)
+
+sys.exit(hasattr(setuptools, "_distribute"))
+"""
+
+f = open('script.py', 'w')
+f.write(script)
+f.close()
+
+args = [sys.executable] + ['script.py']
-args = [sys.executable] + ['-c', 'import setuptools; import sys; sys.exit(hasattr(setuptools, "_distribute"))']
if is_jython:
res = subprocess.call([sys.executable] + args)
else: