Check that chunking defaults to line splitting with non-existent and None languages.
()
| 32 | |
| 33 | |
| 34 | def test_chunk_source_language() -> None: |
| 35 | """Check that chunking defaults to line splitting with non-existent and None languages.""" |
| 36 | with patch("semble.chunking.chunking.chunk_lines", wraps=chunk_lines) as chunk_line_spy: |
| 37 | assert chunk_source("hello", "foo.loki", "loki") == [ |
| 38 | Chunk(content="hello", file_path="foo.loki", start_line=1, end_line=1, language="loki") |
| 39 | ] |
| 40 | chunk_line_spy.assert_called_once() |
| 41 | with patch("semble.chunking.chunking.chunk_lines", wraps=chunk_lines) as chunk_line_spy: |
| 42 | assert chunk_source("1+1=3", "foo.json", None) == [ |
| 43 | Chunk(content="1+1=3", file_path="foo.json", start_line=1, end_line=1, language=None) |
| 44 | ] |
| 45 | chunk_line_spy.assert_called_once() |
| 46 | |
| 47 | |
| 48 | def test_core_chunk_empty_input() -> None: |
nothing calls this directly
no test coverage detected