(self, tmpdir, monkeypatch)
| 909 | assert y == x |
| 910 | |
| 911 | def test_sysfind_multiple(self, tmpdir, monkeypatch): |
| 912 | monkeypatch.setenv( |
| 913 | "PATH", "{}:{}".format(tmpdir.ensure("a"), tmpdir.join("b")), prepend=":" |
| 914 | ) |
| 915 | tmpdir.ensure("b", "a") |
| 916 | x = local.sysfind("a", checker=lambda x: x.dirpath().basename == "b") |
| 917 | assert x.basename == "a" |
| 918 | assert x.dirpath().basename == "b" |
| 919 | assert local.sysfind("a", checker=lambda x: None) is None |
| 920 | |
| 921 | def test_sysexec(self): |
| 922 | x = local.sysfind("ls") |