| commit 654: | bf321d0c7f24 |
| parent 653: | 609d908499e0 |
| branch: | 0.6-maintenance |
now using subprocess.call
- View tarek's profile
-
tarek's public repos »
- buildout-distribute
- wikirial
- zopewatcher
- distribute
- hitchhiker-guide-packaging
- staticmetadata
- hgexternals
- distutils-configure
- FormAlchemy
- distutils.version
- extensions
- ldapauth
- virtualenv-distribute-option
- texttools
- distutils-buildbot
- keyringsql
- atomisator
- pypi
- CLVault
- distutils2
- getpass
- pep376
- z3c.recipe.debian
- vsp
- Send message
3 months ago
Changed (Δ163 bytes):
raw changeset »
tests/manual_test.py (13 lines added, 9 lines removed)
Up to file-list tests/manual_test.py:
| … | … | @@ -11,6 +11,7 @@ import subprocess |
11 |
11 |
from distutils.command.install import INSTALL_SCHEMES |
12 |
12 |
from string import Template |
13 |
13 |
from urllib2 import urlopen |
14 |
import subprocess |
|
14 |
15 |
|
15 |
16 |
def tempdir(func): |
16 |
17 |
def _tempdir(*args, **kwargs): |
| … | … | @@ -48,13 +49,15 @@ if sys.platform == 'win32': |
48 |
49 |
else: |
49 |
50 |
PURELIB = INSTALL_SCHEMES['unix_prefix']['purelib'] |
50 |
51 |
|
52 |
def _system_call(*args): |
|
53 |
assert subprocess.call(args) == 0 |
|
51 |
54 |
|
52 |
55 |
@tempdir |
53 |
56 |
def test_virtualenv(): |
54 |
57 |
"""virtualenv with distribute""" |
55 |
58 |
purelib = os.path.abspath(Template(PURELIB).substitute(**_VARS)) |
56 |
os.system('virtualenv --no-site-packages . --distribute') |
|
57 |
os.system('bin/easy_install distribute==dev') |
|
59 |
_system_call('virtualenv', '--no-site-packages', '.', '--distribute') |
|
60 |
_system_call('bin/easy_install', 'distribute==dev') |
|
58 |
61 |
# linux specific |
59 |
62 |
site_pkg = os.listdir(purelib) |
60 |
63 |
site_pkg.sort() |
| … | … | @@ -68,19 +71,20 @@ def test_virtualenv(): |
68 |
71 |
@tempdir |
69 |
72 |
def test_full(): |
70 |
73 |
"""virtualenv + pip + buildout""" |
71 |
os.system('virtualenv --no-site-packages .') |
|
72 |
os.system('bin/easy_install -q distribute==dev') |
|
73 |
os.system('bin/easy_install -qU distribute==dev') |
|
74 |
os.system('bin/easy_install -q pip') |
|
75 |
|
|
74 |
_system_call('virtualenv', '--no-site-packages', '.') |
|
75 |
_system_call('bin/easy_install', '-q', 'distribute==dev') |
|
76 |
_system_call('bin/easy_install', '-qU', 'distribute==dev') |
|
77 |
_system_call('bin/easy_install', '-q', 'pip') |
|
78 |
_system_call('bin/pip', 'install', '-q', 'zc.buildout') |
|
79 |
||
76 |
80 |
with open('buildout.cfg', 'w') as f: |
77 |
81 |
f.write(SIMPLE_BUILDOUT) |
78 |
82 |
|
79 |
83 |
with open('bootstrap.py', 'w') as f: |
80 |
84 |
f.write(urlopen(BOOTSTRAP).read()) |
81 |
85 |
|
82 |
os.system('bin/python bootstrap.py --distribute') |
|
83 |
os.system('bin/buildout -q') |
|
86 |
_system_call('bin/python', 'bootstrap.py', '--distribute') |
|
87 |
_system_call('bin/buildout', '-q') |
|
84 |
88 |
eggs = os.listdir('eggs') |
85 |
89 |
eggs.sort() |
86 |
90 |
assert len(eggs) == 3 |
