Preserve RRD preview frames and clarify onboard K1 status
This commit is contained in:
@@ -1702,3 +1702,21 @@ def test_exact_session_invalidation_does_not_clear_new_scan_handle() -> None:
|
||||
) is not None
|
||||
|
||||
asyncio.run(scenario())
|
||||
|
||||
|
||||
@pytest.mark.parametrize("platform,present", [("linux", True), ("linux", False), ("darwin", False)])
|
||||
def test_status_read_native_cache_check_is_linux_only(monkeypatch, platform, present):
|
||||
from types import SimpleNamespace
|
||||
|
||||
calls = []
|
||||
device = BLEDevice("AA:BB:CC:DD:EE:FF", "synthetic", {"path": "/synthetic/bluez"})
|
||||
|
||||
async def retrieve(address, details):
|
||||
calls.append((address, details))
|
||||
return device if present else None
|
||||
|
||||
monkeypatch.setattr(scanner_module, "sys", SimpleNamespace(platform=platform))
|
||||
monkeypatch.setattr(scanner_module, "_retrieve_bluez_device", retrieve)
|
||||
assert asyncio.run(scanner_module.status_read_device_is_current(device)) is (
|
||||
present or platform == "darwin")
|
||||
assert len(calls) == (1 if platform == "linux" else 0)
|
||||
|
||||
Reference in New Issue
Block a user