Carl Meyer  committed 82582ae

put current pip on sys.path for tests; fixes #98; thanks Dave Abrahams

  • Participants
  • Parent commits 6faedc1
  • Branches default

Comments (0)

Files changed (2)

File tests/

 from test_pip import here, reset_env, run_pip, clear_environ, write_file
 import os
-from pip.basecommand import open_logfile
 def test_options_from_env_vars():
     Test if ConfigOptionParser reads env vars (e.g. not using PyPI here)
     Test opening a log file with no directory name.
+    from pip.basecommand import open_logfile
     fp = open_logfile('testpip.log')
     fp.write('can write')

File tests/

 if 'PYTHONPATH' in os.environ:
     del os.environ['PYTHONPATH']
+# put this checkout of pip first on sys.path
+# necessary to support unit tests that don't use ScriptTest
+sys.path.insert(0, os.path.dirname(here))
 except NameError: