feat(system): feat(windows): cherry-pick Windows parity fixes from #328 — watchdog ctypes (#323), dispatch monitor projects dir encoding (#324), prax atomic_write retry on PermissionError (#325), prax _WindowsSafeRotatingHandler (#318), branch_detector forward-slash normalize, memory_bank config seed (#322), PS profile wrapper (#319/#340). All Windows-only branches or no-op on Linux. 3146 tests pass, ruff zero. Closes #328 scope. Input-X credit preserved. (#342)
Co-authored-by: @devpulse <devpulse@aipass>
This commit is contained in:
@@ -41,7 +41,9 @@ def clean_bridge():
|
||||
class TestBridge:
|
||||
def test_register_and_resolve(self):
|
||||
"""register() then resolve() returns the same callable."""
|
||||
fn = lambda: "result"
|
||||
def fn():
|
||||
"""Test fixture."""
|
||||
return "result"
|
||||
bridge.register("my_contract", fn)
|
||||
assert bridge.resolve("my_contract") is fn
|
||||
|
||||
@@ -62,8 +64,12 @@ class TestBridge:
|
||||
|
||||
def test_register_overwrites(self):
|
||||
"""Registering same name twice replaces the driver."""
|
||||
fn1 = lambda: "first"
|
||||
fn2 = lambda: "second"
|
||||
def fn1():
|
||||
"""First test fixture."""
|
||||
return "first"
|
||||
def fn2():
|
||||
"""Second test fixture."""
|
||||
return "second"
|
||||
bridge.register("dup", fn1)
|
||||
bridge.register("dup", fn2)
|
||||
assert bridge.resolve("dup") is fn2
|
||||
|
||||
Reference in New Issue
Block a user