python unittest: can't call decorated test

前端 未结 4 1008
广开言路
广开言路 2021-01-12 15:43

I have a pretty large test suite and I decorated some of the test_* functions. Now I can\'t call them by ./test.py MySqlTestCase.test_foo_double, python3.2 comp

4条回答
  •  萌比男神i
    2021-01-12 16:30

    This help me:

    from functools import wraps
    

    ...

    @wraps(procedure_name)
    def decorator(test):
    

提交回复
热议问题