diff options
author | tarek <none@none> | 2009-12-21 14:58:30 +0100 |
---|---|---|
committer | tarek <none@none> | 2009-12-21 14:58:30 +0100 |
commit | 04ae5e1755822db9f2c7545e7925cc5a1576121a (patch) | |
tree | 3a13dabd4ae70c23429d4cfa8ae603931ba2b215 /tests/manual_test.py | |
parent | 8b91eb9ff7f2fa30d8c405b737d85e0165b4b99f (diff) | |
download | external_python_setuptools-04ae5e1755822db9f2c7545e7925cc5a1576121a.tar.gz external_python_setuptools-04ae5e1755822db9f2c7545e7925cc5a1576121a.tar.bz2 external_python_setuptools-04ae5e1755822db9f2c7545e7925cc5a1576121a.zip |
now using subprocess.call
--HG--
branch : distribute
extra : rebase_source : 62f83395c4d3d949b9e259c6d193a214e63aef41
Diffstat (limited to 'tests/manual_test.py')
-rw-r--r-- | tests/manual_test.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/manual_test.py b/tests/manual_test.py index d9878832..63464bc5 100644 --- a/tests/manual_test.py +++ b/tests/manual_test.py @@ -11,6 +11,7 @@ import subprocess from distutils.command.install import INSTALL_SCHEMES from string import Template from urllib2 import urlopen +import subprocess def tempdir(func): def _tempdir(*args, **kwargs): @@ -48,13 +49,15 @@ if sys.platform == 'win32': else: PURELIB = INSTALL_SCHEMES['unix_prefix']['purelib'] +def _system_call(*args): + assert subprocess.call(args) == 0 @tempdir def test_virtualenv(): """virtualenv with distribute""" purelib = os.path.abspath(Template(PURELIB).substitute(**_VARS)) - os.system('virtualenv --no-site-packages . --distribute') - os.system('bin/easy_install distribute==dev') + _system_call('virtualenv', '--no-site-packages', '.', '--distribute') + _system_call('bin/easy_install', 'distribute==dev') # linux specific site_pkg = os.listdir(purelib) site_pkg.sort() @@ -68,19 +71,20 @@ def test_virtualenv(): @tempdir def test_full(): """virtualenv + pip + buildout""" - os.system('virtualenv --no-site-packages .') - os.system('bin/easy_install -q distribute==dev') - os.system('bin/easy_install -qU distribute==dev') - os.system('bin/easy_install -q pip') - os.system('bin/pip install -q zc.buildout') + _system_call('virtualenv', '--no-site-packages', '.') + _system_call('bin/easy_install', '-q', 'distribute==dev') + _system_call('bin/easy_install', '-qU', 'distribute==dev') + _system_call('bin/easy_install', '-q', 'pip') + _system_call('bin/pip', 'install', '-q', 'zc.buildout') + with open('buildout.cfg', 'w') as f: f.write(SIMPLE_BUILDOUT) with open('bootstrap.py', 'w') as f: f.write(urlopen(BOOTSTRAP).read()) - os.system('bin/python bootstrap.py --distribute') - os.system('bin/buildout -q') + _system_call('bin/python', 'bootstrap.py', '--distribute') + _system_call('bin/buildout', '-q') eggs = os.listdir('eggs') eggs.sort() assert len(eggs) == 3 |