我把各种python unitttest方法打包成一个TestSuite,其中一个特定的测试方法看起来像
<input.MyTest testMethod=test_simple>
看起来这是一个类(这个东西的类型是input.MyTest
),但是有一个附加属性(?)试验方法。在
如何从属性testMethod
(或其他任何属性)中提取名称test_simple
?在
测试代码(我的测试.py)在
^{pr2}$套房代码
from input import MyTest
suite = test.TestSuite()
suite.addTest(MyTest("test_simple"))
print suite._tests[0]
快速阅读文档后,您可能想从^{} 开始
相关问题 更多 >
编程相关推荐