python 单元测试

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
posted @ 2022-11-06 17:25  ty1539  阅读(36)  评论(0编辑  收藏  举报