首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Pytest-xdist适用于pip,但不适用于pipenv。未加载/调度任何测试

Pytest-xdist适用于pip,但不适用于pipenv。未加载/调度任何测试
EN

Stack Overflow用户
提问于 2019-02-16 11:26:26
回答 1查看 180关注 0票数 0

当我通过pip和pipenv安装Pytest时,它可以正常工作。但是,当使用pytest-xdist插件和命令例如pytest -n 4时,这只适用于pip,而不适用于pipenv。未计划或加载任何测试。

代码语言:javascript
复制
mohammad@mohammad-XPS-15-9550:~/Documents/cs203/gatorgrouper$ pipenv run pytest tests/ -n 4
Test session starts (platform: linux, Python 3.6.7, pytest 4.2.1, pytest-sugar 0.9.2)
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/mohammad/Documents/cs203/gatorgrouper/.hypothesis/examples')
rootdir: /home/mohammad/Documents/cs203/gatorgrouper, inifile: pytest.ini
plugins: xdist-1.26.1, sugar-0.9.2, forked-1.0.2, cov-2.6.1, clarity-0.1.0a1, hypothesis-4.5.11
[gw0] linux Python 3.6.7 cwd: /home/mohammad/Documents/cs203/gatorgrouper
[gw1] linux Python 3.6.7 cwd: /home/mohammad/Documents/cs203/gatorgrouper
[gw2] linux Python 3.6.7 cwd: /home/mohammad/Documents/cs203/gatorgrouper
[gw3] linux Python 3.6.7 cwd: /home/mohammad/Documents/cs203/gatorgrouper
[gw0] Python 3.6.7 (default, Oct 22 2018, 11:32:17)  -- [GCC 8.2.0]
[gw1] Python 3.6.7 (default, Oct 22 2018, 11:32:17)  -- [GCC 8.2.0]
[gw2] Python 3.6.7 (default, Oct 22 2018, 11:32:17)  -- [GCC 8.2.0]
[gw3] Python 3.6.7 (default, Oct 22 2018, 11:32:17)  -- [GCC 8.2.0]
gw0 [0] / gw1 [0] / gw2 [0] / gw3 [0]
scheduling tests via LoadScheduling


Results (1.05s):

这是我当前的pipfile:

代码语言:javascript
复制
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
pylint = "*"
black = "*"
pytest = "*"
six = "*"
codecov = "*"
"flake8" = "*"
pytest-cov = "*"
neovim = "*"
pytest-sugar = "*"
pytest-clarity = "*"
autopep8 = "*"
gspread =  "*"
oauth2client = "*"
pytest-xdist = "*"

[packages]
pathlib = "*"
py = "*"

[requires]
python_version = "3.6"

[pipenv]
allow_prereleases = true
EN

回答 1

Stack Overflow用户

发布于 2019-08-21 16:48:02

这也发生在我身上。似乎pytest-xdist不支持pytest-clarity。去掉它就行了。现在,再次并行启动测试对您来说应该是可行的。

代码语言:javascript
复制
pip uninstall pytest-clarity

致以问候!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54719618

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档