The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
feat(android): Aria2 RPC 加的链接解析失败时提示用户
XiaoYouChRa68fcf931e0f
diff --git a/tests/helpers.py b/tests/helpers.pyindex 67237de3..21ddd1dc 100644--- a/tests/helpers.py+++ b/tests/helpers.py@@ -14,13 +14,14 @@ class StubFlows:def __init__(self):self.states: dict[str, str] = {}self.history: list[str] = []+ self.events: list[tuple[str, str]] = []def setState(self, key, value):self.states[key] = valueself.history.append(key)def sendEvent(self, key, value):- pass+ self.events.append((key, value))def loadBridge():diff --git a/tests/test_android_request.py b/tests/test_android_request.pyindex abf22ee0..e699b5de 100644--- a/tests/test_android_request.py+++ b/tests/test_android_request.py@@ -104,3 +104,12 @@ def test_aria2_listen_state_is_pushed(engine, state, expected):engine._emitAria2Rpc()assert json.loads(engine._flows.states["aria2Rpc"]) == expected+++def test_aria2_parse_failure_is_a_notice(engine):+ engine._onParseFailed("https://a.test/f", TaskError("发生了意外错误:{detail}", detail="unreachable"))++ [(key, value)] = engine._flows.events+ assert key == "notice"+ assert json.loads(value) == {"kind": "parseFailed", "url": "https://a.test/f",+ "message": "发生了意外错误:{detail}", "params": {"detail": "unreachable"}}