first commit

This commit is contained in:
strepsiades
2026-03-09 16:31:42 +08:00
commit 4a9c444b10
486 changed files with 52479 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
from __future__ import annotations
from sync_state_machine.engine.semantics import (
CoreBindingResult,
classify_core_pair,
)
def test_core_pair_and_event_mapping():
local, peer = classify_core_pair(
has_binding_record=True,
local_data={"id": "l1"},
peer_data={"id": "r1"},
)
assert (local, peer) == (CoreBindingResult.NORMAL, CoreBindingResult.NORMAL)
local2, peer2 = classify_core_pair(
has_binding_record=True,
local_data={"id": "l1"},
peer_data=None,
)
assert (local2, peer2) == (CoreBindingResult.WARNING, CoreBindingResult.ABNORMAL)