Orchestrata Ultimate › Tests › Reference › session › test_session_kg_sync

Tests reference — tests/session/test_session_kg_sync.py

Module of tests/session, split out because the directory page would be too large.

Prose pending.

tests/session/test_session_kg_sync.py

source · 17 tests · 218 lines

Tests for session.kg_sync — KnowledgeGraphSyncer (local parts).

Covers: session.kg_sync/ (package)

Kind Name Line Description
class TestSyncStats 29 Tests for SyncStats dataclass.
method TestSyncStats.test_default_values 32 Test default initialization.
method TestSyncStats.test_ok_property_no_errors 42 Test ok property returns True when no errors.
method TestSyncStats.test_ok_property_with_errors 47 Test ok property returns False when errors exist.
method TestSyncStats.test_to_dict 52 Test to_dict serialization.
method TestSyncStats.test_errors_independent_per_instance 72 Test that errors lists are independent.
class TestKnowledgeGraphSyncerInit 80 Tests for KnowledgeGraphSyncer initialization.
method TestKnowledgeGraphSyncerInit.test_default_init 83 Test default initialization.
method TestKnowledgeGraphSyncerInit.test_custom_init 93 Test initialization with custom parameters.
class TestKnowledgeGraphSyncerConnect 112 Tests for connect/close lifecycle.
method TestKnowledgeGraphSyncerConnect.test_connect_bad_uri 115 Test connect with bad URI returns False.
method TestKnowledgeGraphSyncerConnect.test_close_when_not_connected 126 Test close is safe when not connected.
class TestLatestModifiedFile 133 Tests for latest_modified_file static method.
method TestLatestModifiedFile.test_empty_directory 136 Test empty directory returns None.
method TestLatestModifiedFile.test_single_file 142 Test directory with a single file.
method TestLatestModifiedFile.test_multiple_files_returns_newest 150 Test that the newest file is returned.
method TestLatestModifiedFile.test_ignores_pycache 164 Test that pycache directories are ignored.
method TestLatestModifiedFile.test_ignores_git_dir 176 Test that .git directories are ignored.
method TestLatestModifiedFile.test_nested_files 188 Test finding newest file in nested directories.
method TestLatestModifiedFile.test_custom_ignore_dirs 198 Test with custom ignore directory set.
method TestLatestModifiedFile.test_directory_only_returns_none 213 Test directory with only subdirectories returns None.