我有以下代码片段 -
import unittest
class SimpleWidgetTestCase(unittest.TestCase):
def setUp(self):
print 'setup'
def method_test(self):
print 'test method'
def tearDown(self):
print 'tear down'
if __name__ == "__main__":
unittest.main()
输出 -
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK