【问题标题】:How can i run a specific parametric test-case in py.test in Eclipse如何在 Eclipse 的 py.test 中运行特定的参数测试用例
【发布时间】:2018-07-08 11:52:10
【问题描述】:

虽然 PyDev 支持 py.test 运行程序,但在运行 parametric-tests 时,无法在 PyUnit中运行特定的测试用例> 查看。

通常,在 PyUnit 视图中的测试用例上单击鼠标右键+运行会重新启动它 - 但在这种情况下,什么都不会发生,并且控制台会记录:

============================= test session starts =============================
platform win32 -- Python 3.6.1, pytest-3.2.1, py-1.4.33, pluggy-0.4.0
rootdir: D:\project, inifile:
collected 23 items

======================== no tests ran in 0.04 seconds =========================

(请注意,我仅在 Windows 上尝试过)

【问题讨论】:

    标签: python eclipse pydev pytest liclipse


    【解决方案1】:

    不支持在 PyDev 中运行单个参数失败的测试用例(也无法真正想出一种方法来完成这项工作)。

    因此,您必须运行测试,该测试将在传递所有参数参数的情况下运行它(即:使用 Ctrl+Shift+Up / Ctrl+Shift+Down 在编辑器中选择测试,然后使用 Ctrl+F9 仅运行该测试)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-07
      • 1970-01-01
      • 1970-01-01
      • 2018-03-14
      • 1970-01-01
      相关资源
      最近更新 更多