参数化模块parameterized执行时装饰器传入数据格式问题

看parameterized模块的代码:

@classmethod
def expand(cls, input, name_func=None, doc_func=None, skip_on_empty=False,
**legacy):
""" A "brute force" method of parameterizing test cases. Creates new
test cases and injects them into the namespace that the wrapped
function is being defined in. Useful for parameterizing tests in
subclasses of ‘UnitTest‘, where Nose test generators don‘t work.

>>> @parameterized.expand([("foo", 1, 2)])
... def test_add1(name, input, expected):
... actual = add1(input)
... assert_equal(actual, expected)
...
>>> locals()
... ‘test_add1_foo_0‘: <function ...> ...
>>>
"""
装饰器传入的参数的格式是列表类型[(),()]

参数化模块parameterized执行时装饰器传入数据格式问题

上一篇:C# winform 上传文件到服务器


下一篇:资产收集-火器域名收集(1)