import unittest
class MyTestCase(unittest.TestCase):
def test_something(self):
self.assertEqual(0, False)
if __name__ == '__main__':
unittest.main()
输出:
Ran 1 test in 0.000s
OK
Launching unittests with arguments python -m unittest D:/python3.64/sss/python_note/python_note/Problems_疑难问题/pycharm_file/模块三/123.py in D:\python3.64\sss\python_note\python_note\Problems_疑难问题\pycharm_file\模块三
Process finished with exit code 0
标签:__,python,Problems,unittest,单元测试,note,file
From: https://www.cnblogs.com/heris/p/16863140.html