How do you configure PyCharm to run py.test with command-line options like -s?

情到浓时终转凉″ 提交于 2019-12-04 17:15:14

问题


I figured out how to run py.test files from PyCharm:

  • Run/Debug configurations
  • in the Python tests category, click the "+" button to add a new configuration
  • choose py.test
  • enter the full path for the Target script and the working directory

but I can't seem to add the -s option to allow my test script to run with standard output not captured and hidden. (I tried -s under interpreter options but it appears not to do anything.)

How can I enable -s?


回答1:


D'oh, I figured it out after all:

You add it in the py.tests Options area of the Run/Edit configuration dialog.



来源:https://stackoverflow.com/questions/27868516/how-do-you-configure-pycharm-to-run-py-test-with-command-line-options-like-s

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!