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

Method test_compare_with_compgen

testing/test_argcomplete.py:70–85  ·  view source on GitHub ↗
(
        self, tmp_path: Path, monkeypatch: MonkeyPatch
    )

Source from the content-addressed store, hash-verified

68class TestArgComplete:
69 @pytest.mark.skipif("sys.platform in ('win32', 'darwin')")
70 def test_compare_with_compgen(
71 self, tmp_path: Path, monkeypatch: MonkeyPatch
72 ) -> None:
73 from _pytest._argcomplete import FastFilesCompleter
74
75 ffc = FastFilesCompleter()
76 fc = FilesCompleter()
77
78 monkeypatch.chdir(tmp_path)
79
80 assert equal_with_bash("", ffc, fc, out=sys.stdout)
81
82 tmp_path.cwd().joinpath("data").touch()
83
84 for x in ["d", "data", "doesnotexist", ""]:
85 assert equal_with_bash(x, ffc, fc, out=sys.stdout)
86
87 @pytest.mark.skipif("sys.platform in ('win32', 'darwin')")
88 def test_remove_dir_prefix(self):

Callers

nothing calls this directly

Calls 4

FastFilesCompleterClass · 0.90
FilesCompleterClass · 0.85
equal_with_bashFunction · 0.85
chdirMethod · 0.45

Tested by

no test coverage detected