pycharm 运行pytest的先决条件 不然会报no tests were found
1.pycharm的单元测试的运行方式改为py.testfile-setting-Tools-python integrated tools - Default test runner 改为py.test2.py文件的文件名没有要求,类名必须是Test开头的类名(大写的T),test或者test_都不行3.方法名义test开头就好...