Orchestrata Ultimate › Tests › Reference › knowledge_graph › test_knowledge_sync
Tests reference — tests/knowledge_graph/test_knowledge_sync.py
Module of tests/knowledge_graph, split out because the directory page would be too large.
Prose pending.
tests/knowledge_graph/test_knowledge_sync.py
source · 37 tests · 369 lines
Tests for Knowledge Graph file synchronizer.
Covers: knowledge_graph.code_parser, knowledge_graph.config, knowledge_graph.synchronizer, knowledge_graph.types
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestFileSynchronizerInit |
48 | Test initialization. |
| method | TestFileSynchronizerInit.test_init_default |
51 | |
| method | TestFileSynchronizerInit.test_init_project_id |
59 | |
| method | TestFileSynchronizerInit.test_file_node_id_is_project_qualified |
63 | |
| method | TestFileSynchronizerInit.test_file_node_id_fallback_to_path |
67 | |
| method | TestFileSynchronizerInit.test_init_custom_config |
71 | |
| method | TestFileSynchronizerInit.test_init_custom_parser |
77 | |
| class | TestSyncFile |
83 | Test single file synchronization. |
| method | TestSyncFile.test_sync_python_file |
86 | |
| method | TestSyncFile.test_sync_prolog_file |
93 | |
| method | TestSyncFile.test_sync_nonexistent_file |
99 | |
| method | TestSyncFile.test_sync_same_file_twice_skips |
106 | |
| method | TestSyncFile.test_sync_modified_file_resyncs |
114 | |
| method | TestSyncFile.test_sync_count_increments |
124 | |
| method | TestSyncFile.test_sync_duration_recorded |
132 | |
| class | TestSyncProject |
138 | Test project-level synchronization. |
| method | TestSyncProject.test_sync_project |
141 | |
| method | TestSyncProject.test_sync_project_py_only |
147 | |
| method | TestSyncProject.test_sync_project_includes_subdirs |
153 | |
| method | TestSyncProject.test_sync_nonexistent_project |
160 | |
| method | TestSyncProject.test_sync_project_respects_max_files |
166 | |
| method | TestSyncProject.test_sync_project_ignores_pycache |
172 | |
| class | TestFileHashing |
184 | Test file hash tracking. |
| method | TestFileHashing.test_get_file_hash_tracked |
187 | |
| method | TestFileHashing.test_get_file_hash_untracked |
195 | |
| method | TestFileHashing.test_needs_sync_untracked |
199 | |
| method | TestFileHashing.test_needs_sync_after_sync |
204 | |
| class | TestWatching |
211 | Test watch/stop watching. |
| method | TestWatching.test_watch |
214 | |
| method | TestWatching.test_stop_watching |
220 | |
| class | TestTrackedFiles |
227 | Test tracked files property. |
| method | TestTrackedFiles.test_tracked_files_empty |
230 | |
| method | TestTrackedFiles.test_tracked_files_after_sync |
234 | |
| class | TestClear |
241 | Test clearing sync state. |
| method | TestClear.test_clear |
244 | |
| class | TestSyncPerformance |
254 | Test sync performance. |
| method | TestSyncPerformance.test_single_file_under_50ms |
257 | |
| method | TestSyncPerformance.test_project_sync_under_200ms |
264 | |
| class | TestPersistentSyncState |
272 | Persisted hash state lets incremental sync survive restarts. |
| method | TestPersistentSyncState.test_sync_project_persists_hash_state |
275 | After sync_project, a fresh FileSynchronizer sees no changed files. |
| method | TestPersistentSyncState.test_ensure_fresh_resyncs_after_file_change |
283 | When a file is modified, ensure_fresh re-syncs just that file. |
| method | TestPersistentSyncState.test_state_file_is_created |
299 | sync_project writes a state file under .orchestrata/. |
| method | TestPersistentSyncState.test_clear_does_not_delete_state_file |
307 | clear() resets in-memory state but leaves persisted state alone. |
| class | TestEnsureFreshBudgets |
319 | ensure_fresh degrades on a large/cold tree instead of hanging. |
| method | TestEnsureFreshBudgets.test_ensure_fresh_respects_max_files |
328 | max_files bounds files CONSIDERED, mirroring sync_project. |
| method | TestEnsureFreshBudgets.test_ensure_fresh_stops_early_on_wall_clock_deadline |
335 | A cold cache over a real, sizeable tree with a small deadline |
| method | TestEnsureFreshBudgets.test_ensure_fresh_generous_deadline_completes_normally |
363 | A deadline that is never hit changes nothing — every changed |