【发布时间】:2018-08-28 07:12:00
【问题描述】:
我在从 PyCharm 内部运行 pytest 测试时遇到问题
我在 C:\Temp 的名为 agent_automation_2 的文件夹中有一个文件 x_tests.py,该文件的内容是
import pytest
def test_mytest():
assert False
当我运行时,我得到以下输出
C:\Python36-32\python.exe "C:\Program Files\JetBrains\PyCharm 2017.3.2\helpers\pycharm_jb_pytest_runner.py" --path C:/Temp/agents_automation_2 在 C:\Temp\agents_automation_2 中使用参数 C:/Temp/agents_automation_2 启动 py.test ============================= 测试开始================== =========== 平台 win32 -- Python 3.6.4、pytest-3.4.2、py-1.5.2、pluggy-0.6.0 根目录:C:\Temp\agents_automation_2,inifile: 插件:xdist-1.22.0,forked-0.2 已收集 0 件商品 ======================== 0.01 秒内没有运行测试 ==================== =====
但是,当我从文件夹内的常规 Windows 命令行运行时,测试运行正常
知道可能是什么问题吗?
谢谢!!!
【问题讨论】:
标签: python-3.x pycharm