# HG changeset patch # User Jeff Hammel # Date 1330709818 28800 # Node ID e62d2fddb275bd0a9936a40b4a201260f314966b # Parent cf03c3f2f98ef09130ebd21206d9a53ffd1390a3 use the actual paths i mean diff -r cf03c3f2f98e -r e62d2fddb275 tests/test.py --- a/tests/test.py Thu Mar 01 19:40:10 2012 -0800 +++ b/tests/test.py Fri Mar 02 09:36:58 2012 -0800 @@ -20,7 +20,9 @@ def create_virtualenv(path): """create a virtualenv and return the path to the python interpreter therein""" + virtualenv.create_environment(path) + for scripts, ext in (('bin', ''), ('Scripts', '.exe')): scripts = os.path.join(path, scripts) if os.path.exists(scripts): @@ -28,7 +30,7 @@ else: raise Exception("bin/Scripts not found in %s" % path) binaries = ['python', 'easy_install', 'pip'] - binaries = dict([(i, i + ext) for i in binaries]) + binaries = dict([(i, os.path.join(scripts, i + ext)) for i in binaries]) return type('virtualenv', (), binaries) def run_tests(raise_on_error=False, report_first=False): diff -r cf03c3f2f98e -r e62d2fddb275 tests/test_ttw.txt --- a/tests/test_ttw.txt Thu Mar 01 19:40:10 2012 -0800 +++ b/tests/test_ttw.txt Fri Mar 02 09:36:58 2012 -0800 @@ -61,7 +61,7 @@ >>> tmpdir = tempfile.mkdtemp() >>> venv = create_virtualenv(tmpdir) - >>> code = subprocess.call([venv.python, '-c', 'import helloworld']) + >>> code = subprocess.call([venv.python, '-c', 'import helloworld'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) >>> code 1 >>> shutil.rmtree(tmpdir)