繁体   English   中英

由于跑者当前目录,py.m测试在Pycharm 2017.1中失败

[英]py.test tests fail in Pycharm 2017.1 due to runner current directory

刚刚安装了新版本的Pycharm 2017.1,我所有的py.test测试用例都停止了工作。 做了一点挖掘,似乎以前版本的Pycharm用于从项目Test目录运行测试用例。 现在Pycharm似乎从项目Root目录运行测试 - 因此测试发现不能正常工作。

其他人已经发现了同样的问题 ,但尚无解决方案。

我试图在Edit Configurations手动设置工作目录,但这不起作用。 有人建议解决这个问题吗?

请注意,我曾经能够右键单击测试用例,而Pycharm会让我选择只运行那个案例。 现在该选项不再出现了。 也许这可能与测试发现有关,因为我收到错误消息Empty test suite.

添加

Pycharm的错误日志。 请注意,测试是从包根目录而不是../test directory

Testing started at 6:15 PM ...
Launching py.test with arguments 
test_pyugend.py::test_bokeh_sweep_plot_overall
ERROR: file not found: test_pyugend.py::test_bokeh_sweep_plot_overall
============================= test session starts 
==============================
platform linux -- Python 3.5.2, pytest-3.0.5, py-1.4.32, pluggy-0.4.0
rootdir: 


/media/krishnab/jaimini/development/gender_equity/
university_gender_dynamics/py_package_ugend, inifile: 

========================= no tests ran in 0.00 seconds 
=========================

Process finished with exit code 0
Empty test suite.

我的Pycharm版本信息是:

PyCharm 2017.1
Build #PY-171.3780.115, built on March 24, 2017
Licensed to shrikrishna bhogaonker
Subscription is active until January 13, 2018
For educational use only.
JRE: 1.8.0_112-release-736-b13 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.4.0-59-generic 

此图片中捕获的运行配置。 在此输入图像描述

有相同的情况。 更新了pycharm到版本2017.1.2.it现在对我有用。

PyCharm 2017.1.2 Build#PY-171.4249.47 JRE:1.8.0_112-release-736-b21 x86_64 Mac OS X 10.11.4

https://confluence.jetbrains.com/display/PYH/PyCharm+171.4249.47+Release+Notes?fromIDE

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM