MCPcopy Index your code
hub / github.com/pytest-dev/pytest / test_compare_with_compgen

Method test_compare_with_compgen

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

Source from the content-addressed store, hash-verified

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