Commits

Kanwei Li committed f22bb24

Tests now run when PYTHONPATH is not set

  • Participants
  • Parent commits a60554d

Comments (0)

Files changed (1)

script_tests/base/__init__.py

         real_command = string.Template( command_line ).substitute( all_fnames )
         # Augment PYTHONPATH, bit of a HACK here! need to suck this data from setuptools or something?
         env = dict( os.environ )
-        env['PYTHONPATH'] = "./lib:" + env['PYTHONPATH']
+        if 'PYTHONPATH' in env:
+            env['PYTHONPATH'] = "./lib:" + env['PYTHONPATH']
+        else:
+            env['PYTHONPATH'] = "./lib"
         # Run the command
         assert subprocess.call( real_command, stdin=stdin, stdout=stdout, stderr=stderr, shell=True, env=env ) == 0
         # Check the outputs