1、创建的.py文件名不能以test方法开头;

2、

导入   from unittest import TestCase

 

#将unittest.main() 换成这样

if __name__ == '__main__':

  TestCase

相关文章: