我正在尝试从 TestCase 中模拟模块内的多个函数:
from mock import patch, DEFAULT, Mock
function_a = Mock()
function_a.return_value = ['a', 'list']
with patch.multiple('target.module',
function_a=function_a,
function_b=DEFAULT) as (f_a, f_b):
令我惊讶的是,这不起作用,给了我以下 Traceback:
ValueError: need more than 1 value to unpack