common.py 358 Bytes
Newer Older
Jait Dixit's avatar
Jait Dixit committed
1
2
3
4
5
6
7
8
9
10
11
from nose_parameterized import parameterized


def custom_name_func(testcase_func, param_num, param):
    return "%s_%s" % (
        testcase_func.__name__,
        parameterized.to_safe_name("_".join(str(x) for x in param.args)),
    )

expand = lambda z: parameterized.expand(z,
                                        testcase_func_name=custom_name_func)