【发布时间】:2012-11-29 13:07:02
【问题描述】:
我遇到了一些单元测试。
这是我能想到的最简单的例子:
#testito.py
import unittest
class Prueba(unittest.TestCase):
def setUp(self):
pass
def printsTrue(self):
self.assertTrue(True)
if __name__=="__main__":
unittest.main()
问题是,运行这个没有效果:
$ python testito.py
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
我摸不着头脑,因为我看不出上面的代码有任何问题。 现在发生了几次测试,我真的不知道下一步该怎么做。 有什么想法吗?
【问题讨论】:
标签: python unit-testing