gpt4 book ai didi

python - 我如何在 Eclipse 中的 pytest 中运行特定的参数化测试用例

转载 作者:太空宇宙 更新时间:2023-11-03 14:10:48 25 4
gpt4 key购买 nike

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

通常,在 PyUnit View 中的测试用例上右键单击并运行会重新启动它 - 但在这种情况下,什么也没有发生,并且控制台记录:

============================= 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 上尝试过)

最佳答案

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

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

关于python - 我如何在 Eclipse 中的 pytest 中运行特定的参数化测试用例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48507122/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com