aboutsummaryrefslogtreecommitdiffstats
path: root/tests/install_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/install_test.py')
-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: