1.以pytest方式运行,需要运行该设置默认的运行器:file->Setting->Tools->Python integrated Tools-> 2.把里面的 Default test runner 更改为 pytest