MCPcopy
hub / github.com/pytest-dev/pytest / test_sysfind_multiple

Method test_sysfind_multiple

testing/_py/test_local.py:911–919  ·  view source on GitHub ↗
(self, tmpdir, monkeypatch)

Source from the content-addressed store, hash-verified

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")

Callers

nothing calls this directly

Calls 6

setenvMethod · 0.80
ensureMethod · 0.80
joinMethod · 0.80
sysfindMethod · 0.80
dirpathMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected