get_dirs_from_args() skips over non-existing directories and files
(tmp_path)
| 122 | |
| 123 | |
| 124 | def 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] |
nothing calls this directly
no test coverage detected