MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_get_dirs_from_args

Function test_get_dirs_from_args

testing/test_findpaths.py:124–135  ·  view source on GitHub ↗

get_dirs_from_args() skips over non-existing directories and files

(tmp_path)

Source from the content-addressed store, hash-verified

122
123
124def test_get_dirs_from_args(tmp_path):
125 """get_dirs_from_args() skips over non-existing directories and files"""
126 fn = tmp_path / "foo.py"
127 fn.touch()
128 d = tmp_path / "tests"
129 d.mkdir()
130 option = "--foobar=/foo.txt"
131 # xdist uses options in this format for its rsync feature (#7638)
132 xdist_rsync_option = "popen=c:/dest"
133 assert get_dirs_from_args(
134 [str(fn), str(tmp_path / "does_not_exist"), str(d), option, xdist_rsync_option]
135 ) == [fn.parent, d]

Callers

nothing calls this directly

Calls 2

get_dirs_from_argsFunction · 0.90
mkdirMethod · 0.45

Tested by

no test coverage detected