您如何配置 PyCharm 以使用 -s 等命令行选项运行 py.test? [英] How do you configure PyCharm to run py.test with command-line options like -s?

查看:44
本文介绍了您如何配置 PyCharm 以使用 -s 等命令行选项运行 py.test?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想出了如何从 PyCharm 运行 py.test 文件:

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

  • 运行/调试配置
  • 在 Python 测试类别中,单击+"按钮添加新配置
  • 选择py.test
  • 输入目标脚本的完整路径和工作目录

但我似乎无法添加 -s 选项来允许我的测试脚本在没有捕获和隐藏的标准输出的情况下运行.(我在解释器选项下尝试了 -s 但它似乎没有做任何事情.)

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.)

如何启用-s?

推荐答案

天啊,我终于想通了:

您将其添加到运行/编辑配置"对话框的 py.tests 选项区域中.

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

这篇关于您如何配置 PyCharm 以使用 -s 等命令行选项运行 py.test?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆