|
@@ -41,7 +41,7 @@ _DISPATCHER = threading.Event()
|
|
|
_ORIG = {} # (模块对象, 函数名) -> 原函数
|
|
_ORIG = {} # (模块对象, 函数名) -> 原函数
|
|
|
|
|
|
|
|
|
|
|
|
|
-def _fake_poll_all(cfg):
|
|
|
|
|
|
|
+def _fake_poll_all(cfg, progress=None, cancel=None):
|
|
|
_POLLED.append(True)
|
|
_POLLED.append(True)
|
|
|
return 0
|
|
return 0
|
|
|
|
|
|
|
@@ -67,7 +67,7 @@ def _fake_run_dispatcher(cfg, **kw):
|
|
|
|
|
|
|
|
def _install():
|
|
def _install():
|
|
|
_restore() # 先还原(清掉用例内的临时覆盖),保证拿到原函数
|
|
_restore() # 先还原(清掉用例内的临时覆盖),保证拿到原函数
|
|
|
- for mod, name, fake in ((collect, 'poll_all', _fake_poll_all),
|
|
|
|
|
|
|
+ for mod, name, fake in ((collect, 'poll_all_browser', _fake_poll_all),
|
|
|
(media, 'process_full', _fake_process_full),
|
|
(media, 'process_full', _fake_process_full),
|
|
|
(accounts, 'next_anchor', _fake_next_anchor),
|
|
(accounts, 'next_anchor', _fake_next_anchor),
|
|
|
(accounts, 'release_anchor', _fake_release_anchor),
|
|
(accounts, 'release_anchor', _fake_release_anchor),
|