MCPcopy
hub / github.com/MinishLab/semble / test_include_text_files_cli_deprecated

Function test_include_text_files_cli_deprecated

tests/test_cli.py:170–185  ·  view source on GitHub ↗

--include-text-files on CLI raises DeprecationWarning.

(
    monkeypatch: pytest.MonkeyPatch,
    capsys: pytest.CaptureFixture[str],
)

Source from the content-addressed store, hash-verified

168
169
170def test_include_text_files_cli_deprecated(
171 monkeypatch: pytest.MonkeyPatch,
172 capsys: pytest.CaptureFixture[str],
173) -> None:
174 """--include-text-files on CLI raises DeprecationWarning."""
175 chunk = make_chunk("def foo(): pass", "src/foo.py")
176 fake_index = MagicMock()
177 fake_index.search.return_value = [SearchResult(chunk=chunk, score=0.9)]
178 monkeypatch.setattr(sys, "argv", ["semble", "search", "query", "/some/path", "--include-text-files"])
179 with patch("semble.cli.SembleIndex.from_path", return_value=fake_index):
180 with warnings.catch_warnings(record=True) as caught:
181 warnings.simplefilter("always")
182 _cli_main()
183 assert any(
184 "include-text-files" in str(w.message).lower() for w in caught if issubclass(w.category, DeprecationWarning)
185 )
186
187
188@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

make_chunkFunction · 0.90
SearchResultClass · 0.90
_cli_mainFunction · 0.90

Tested by

no test coverage detected