使用ddt做数据驱动,调试单个用例时,遇到报错:AttributeError: type object ...,
一脸懵逼,不用ddt运行时好好的,用到ddt报错
Error
Traceback (most recent call last):
File "C:\Python37\lib\unittest\case.py", line 59, in testPartExecutor
yield
File "C:\Python37\lib\unittest\case.py", line 615, in run
testMethod()
File "C:\Python37\lib\unittest\loader.py", line 34, in testFailure
raise self._exception
File "C:\Python37\lib\unittest\loader.py", line 169, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: type object 'test_aaa' has no attribute 'test_j_xxx'
网上找了一圈,没有找到具体的解决办法。
目前想的是通过@unittest.skip(u"无条件跳过此用例") ,将暂时不调试的用例跳过,执行整个test class
@unittest.skip(u"无条件跳过此用例")
def test_a_version_value(self):