初学pytest.
将pytest写进Python,用pycharm运行时有时候会警告passing a string to pytest.main() is deprecated, pass a list of arguments instead,虽然不影响结果,但总是看着不舒服。
后来发现是运行方式导致的
如果这样运行的话,就会有警告:
run的时候选择py.test则正常,如下:
初学pytest.
将pytest写进Python,用pycharm运行时有时候会警告passing a string to pytest.main() is deprecated, pass a list of arguments instead,虽然不影响结果,但总是看着不舒服。
后来发现是运行方式导致的
如果这样运行的话,就会有警告:
run的时候选择py.test则正常,如下: