How do you configure PyCharm to run py.test with c

2020-06-07 08:19发布

问题:

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.