X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=tests%2Ftest_which.py;h=af9886f81e68f1f142241b25096115d387914015;hb=1f16593fc4003590e488da343cb9bf7febbd10d0;hp=5de5a64662e9c0fac685352d452aea235286cbc9;hpb=78638a131663681fc9a89b246446978abb196325;p=ppu.git diff --git a/tests/test_which.py b/tests/test_which.py index 5de5a64..af9886f 100755 --- a/tests/test_which.py +++ b/tests/test_which.py @@ -6,11 +6,14 @@ import sys from ppu_tu import setup, teardown, find_in_path # noqa -tmp_dir = None - test_prog_path = find_in_path('which.py') -if not test_prog_path: - sys.exit("Cannot find which.py in %s" % os.environ["PATH"]) + +if sys.platform == 'win32': + os_env_pathext = os.environ['PATHEXT'] + pathext = os_env_pathext.lower().split(os.pathsep) + if '.py' not in pathext: + os_env_pathext += ';.py' + os.environ['PATHEXT'] = os_env_pathext def test_which():