解决方法: 1.file--settings--Tools--python intergrated tools找到testing,修改成unittest 2.重新创建一个文件,将源码复制到新文件 3.将方法名修改为test开头