changeset 68:e62d2fddb275

use the actual paths i mean
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 02 Mar 2012 09:36:58 -0800
parents cf03c3f2f98e
children 10f343c483ee
files tests/test.py tests/test_ttw.txt
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):
--- 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)