6 from ppu_tu import setup, teardown, find_in_path # noqa
9 test_prog_path = find_in_path('which.py')
11 if sys.platform == 'win32':
12 os_env_pathext = os.environ['PATHEXT']
13 pathext = os_env_pathext.lower().split(os.pathsep)
14 if '.py' not in pathext:
15 os_env_pathext += ';.py'
16 os.environ['PATHEXT'] = os_env_pathext
20 assert subprocess.check_output(
21 [sys.executable, test_prog_path, "which.py"],
22 universal_newlines=True).strip() == test_prog_path
23 assert subprocess.check_output(
24 [sys.executable, test_prog_path, "WhoWhereWhenceWhichWhereIs.py"],
25 universal_newlines=True).strip() == ''