get_dirs_from_args() skips over non-existing directories and files
(tmp_path)
| 193 | |
| 194 | |
| 195 | def test_get_dirs_from_args(tmp_path): |
| 196 | """get_dirs_from_args() skips over non-existing directories and files""" |
| 197 | fn = tmp_path / "foo.py" |
| 198 | fn.touch() |
| 199 | d = tmp_path / "tests" |
| 200 | d.mkdir() |
| 201 | option = "--foobar=/foo.txt" |
| 202 | # xdist uses options in this format for its rsync feature (#7638) |
| 203 | xdist_rsync_option = "popen=c:/dest" |
| 204 | assert get_dirs_from_args( |
| 205 | [str(fn), str(tmp_path / "does_not_exist"), str(d), option, xdist_rsync_option] |
| 206 | ) == [fn.parent, d] |
| 207 | |
| 208 | |
| 209 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected