diff options
author | tarek <none@none> | 2009-07-22 17:58:08 +0200 |
---|---|---|
committer | tarek <none@none> | 2009-07-22 17:58:08 +0200 |
commit | 2be8a41fed38f9375760d9322edcca5218db05d2 (patch) | |
tree | e0bc2b1f4bc65ebd7b0bc9267141e1096076a625 /tests | |
parent | b0f0ee685ca525de90fdcd5a57a203c8b42b936a (diff) | |
download | external_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.py | 16 |
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: |