Indexing a new project should stream IndexProgressUpdate before IndexResponse.
(daemon_sock: str)
| 223 | |
| 224 | |
| 225 | def test_index_streams_progress(daemon_sock: str) -> None: |
| 226 | """Indexing a new project should stream IndexProgressUpdate before IndexResponse.""" |
| 227 | project = Path(tempfile.mkdtemp(prefix="ccc_strm_")) |
| 228 | save_project_settings(project, default_project_settings()) |
| 229 | (project / "main.py").write_text(SAMPLE_MAIN_PY) |
| 230 | |
| 231 | conn, _ = _connect_and_handshake(daemon_sock) |
| 232 | conn.send_bytes(encode_request(IndexRequest(project_root=str(project)))) |
| 233 | updates, final = _recv_index_response(conn) |
| 234 | conn.close() |
| 235 | |
| 236 | assert final.success is True |
| 237 | assert len(updates) > 0, "Expected at least one IndexProgressUpdate" |
| 238 | for u in updates: |
| 239 | assert u.progress.num_execution_starts >= 0 |
| 240 | |
| 241 | |
| 242 | def test_daemon_remove_project(daemon_sock: str, daemon_project: str) -> None: |
nothing calls this directly
no test coverage detected