【问题标题】:pytest is not parsing command line arguments on windows <instead running all the tests>pytest 没有解析 Windows 上的命令行参数 <而是运行所有测试>
【发布时间】:2013-10-15 21:40:16
【问题描述】:

我有 2.3.3 版本的 pytest 在 Windows 上运行。我有一个测试文件夹,其中包含一堆测试文件,如 test1.py、test2.py、test3.py 等。如果我打开命令提示符并导航到该文件夹​​以运行特定测试

pytest test1.py

它不只是运行 test1.py,而是运行文件夹中的所有测试。像 test1.py、test2.py、test3.py 等。 所以 pytest 不接受参数并解析它们。我只在 Windows 上看到这个。有谁知道这里发生了什么?

提前致谢。

【问题讨论】:

    标签: python command pytest


    【解决方案1】:

    我无法检查这个,但我首先要做的是检查 PATH 是否有 pytest 可执行文件。除了 Windows 批处理脚本,我会继续调查代码,也许这就是 args 丢失或传递(引用?)不正确的地方。

    【讨论】:

      猜你喜欢
      • 2018-06-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-25
      • 2020-08-04
      • 1970-01-01
      • 2012-09-18
      • 2020-04-08
      • 2022-06-30
      相关资源
      最近更新 更多