pycharm运行Pytest警告:passing a string to pytest.main() is deprecated, pass a list of arguments instead.

初学pytest.

将pytest写进Python,用pycharm运行时有时候会警告passing a string to pytest.main() is deprecated, pass a list of arguments instead,虽然不影响结果,但总是看着不舒服。

后来发现是运行方式导致的

如果这样运行的话,就会有警告:

run的时候选择py.test则正常,如下:

猜你喜欢

转载自www.cnblogs.com/may18/p/9272203.html