MCPcopy
hub / github.com/pytest-dev/pytest / test_compare_with_compgen

Method test_compare_with_compgen

testing/test_argcomplete.py:74–89  ·  testing/test_argcomplete.py::TestArgComplete.test_compare_with_compgen
(
        self, tmp_path: Path, monkeypatch: MonkeyPatch
    )

Source from the content-addressed store, hash-verified

72class TestArgComplete:
73 @pytest.mark.skipif(class="st">"sys.platform in (&class="cm">#x27;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(class="st">"", ffc, fc, out=sys.stdout)
85
86 tmp_path.cwd().joinpath(class="st">"data").touch()
87
88 for x in [class="st">"d", class="st">"data", class="st">"doesnotexist", class="st">""]:
89 assert equal_with_bash(x, ffc, fc, out=sys.stdout)
90
91 @pytest.mark.skipif(class="st">"sys.platform in (&class="cm">#x27;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