03 2012 档案
摘要:过去都是用 suite = unittest.makeSuite(HelloTestCase) 建立完整的TestSuite。 升级到Python3后,发现makeSuite没有啦!其实是被下面这段代码取代了。 suite=unittest.TestLoader().loadTestsFromTestCase(HelloTestCase) (备注:TestLoader uses the 'test' method name prefix to identify test methods automatically.) Python啊,善变啊。
阅读全文