简体   繁体   English

pytest做无休止的测试收集并开始

[英]Pytest do endless collecting of tests and doesb`t start

When I am running pytest command it starts to collect all tests, but this process is endless without any errors or mistakes. 当我运行pytest命令时,它开始收集所有测试,但是这个过程是无休止的,没有任何错误或错误。 I don't understand what is the reason. 我不明白是什么原因。 If you have any ideas, please could you share them? 如果您有任何想法,可以分享一下吗? Also if it helps I run it on MacOS, on my Ubuntu computer it works perfect. 另外,如果它可以帮助我在MacOS上运行它,那么在我的Ubuntu计算机上,它可以完美运行。

This is what happened: 这是发生了什么:

Test session starts (platform: linux, Python 3.7.3, pytest 5.0.1, pytest-sugar 0.9.2)
Django settings: settings (from ini file)
rootdir: /home/roziukp/space11/backend, inifile: setup.cfg
plugins: xdist-1.29.0, forked-1.0.2, pythonpath-0.7.3, env-0.6.2, django-3.5.1, sugar-0.9.2, celery-4.3.0, cov-2.7.1, mock-1.10.4
collecting ... 

Set the following configuration in your pytest.ini file. pytest.ini文件中设置以下配置。

testpaths = application/tests
norecursedirs = .git .tox .pytest_cache
python_files = test_*.py

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

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