]> git.phdru.name Git - ppu.git/blob - tests/test_which.py
Build(GHActions): Use `checkout@v4` instead of outdated `v2`
[ppu.git] / tests / test_which.py
1 #! /usr/bin/env python
2
3 import subprocess
4 import sys
5 from ppu_tu import setup, teardown, find_in_path  # noqa
6
7
8 test_prog_path = find_in_path('which.py')
9
10
11 def test_which():
12     assert subprocess.check_output(
13         [sys.executable, test_prog_path, "which.py"],
14         universal_newlines=True).strip() == test_prog_path
15     assert subprocess.check_output(
16         [sys.executable, test_prog_path, "WhoWhereWhenceWhichWhereIs.py"],
17         universal_newlines=True).strip() == ''