simplebot-org / simplebot

Extensible Delta Chat bot written in Python3
Mozilla Public License 2.0
34 stars 9 forks source link

Can not repeat tests with tox. #109

Closed lerdem closed 2 years ago

lerdem commented 2 years ago
# uname -a
Linux nextcloud-VM 4.19.0-19-amd64 #1 SMP Debian 4.19.232-1 (2022-03-07) x86_64 GNU/Linux

After running tox (on 0770380af2493b46d844cd025f44296db976364b version) getting next errors. I think test should be repeatable.

GLOB sdist-make: /home/some_username/simplebot/setup.py
py recreate: /home/some_username/simplebot/.tox/py
py installdeps: pytest, requests, pdbpp
py inst: /home/some_username/simplebot/.tox/.tmp/package/1/simplebot-2.4.1.dev15+g0770380.d20220310.zip
py installed: attrs==21.4.0,certifi==2021.10.8,cffi==1.15.0,charset-normalizer==2.0.12,deltachat==1.72.0,fancycompleter==0.9.1,idna==3.3,IMAPClient==2.2.0,importlib-metadata==4.11.2,iniconfig==1.1.1,Jinja2==3.0.3,MarkupSafe==2.1.0,packaging==21.3,pdbpp==0.10.3,Pillow==9.0.1,pkg_resources==0.0.0,pluggy==1.0.0,py==1.11.0,pycparser==2.21,Pygments==2.11.2,pyparsing==3.0.7,pyrepl==0.9.0,pytest==7.0.1,requests==2.27.1,simplebot @ file:///home/some_username/simplebot/.tox/.tmp/package/1/simplebot-2.4.1.dev15%2Bg0770380.d20220310.zip,six==1.16.0,tomli==2.0.1,typing_extensions==4.1.1,urllib3==1.26.8,wmctrl==0.4,zipp==3.7.0
py run-test-pre: PYTHONHASHSEED='507505052'
py runtests: commands[0] | pytest
==================================================================================== test session starts =====================================================================================
platform linux -- Python 3.7.3, pytest-7.0.1, pluggy-1.0.0 -- /home/some_username/simplebot/.tox/py/bin/python
cachedir: .tox/py/.pytest_cache
Deltachat core=v1.72.0 sqlite=3.36.0 journal_mode=wal
rootdir: /home/some_username/simplebot, configfile: tox.ini
plugins: simplebot-2.4.1.dev15+g0770380.d20220310, deltachat-1.72.0
collected 62 items / 1 error / 61 selected                                                                                                                                                   

=========================================================================================== ERRORS ===========================================================================================
___________________________________________________________________________ ERROR collecting examples/send_file.py ___________________________________________________________________________
ImportError while importing test module '/home/some_username/simplebot/examples/send_file.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.tox/py/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
examples/send_file.py:11: in <module>
    import xkcd
E   ModuleNotFoundError: No module named 'xkcd'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================================================================== 1 error in 0.79s ======================================================================================
ERROR: InvocationError for command '/home/some_username/simplebot/.tox/py/bin/pytest' (exited with code 2)
lint recreate: /home/some_username/simplebot/.tox/lint
lint installdeps: flake8, restructuredtext_lint, pygments
lint develop-inst: /home/some_username/simplebot
lint installed: certifi==2021.10.8,cffi==1.15.0,charset-normalizer==2.0.12,deltachat==1.72.0,docutils==0.18.1,flake8==4.0.1,idna==3.3,IMAPClient==2.2.0,importlib-metadata==4.2.0,Jinja2==3.0.3,MarkupSafe==2.1.0,mccabe==0.6.1,Pillow==9.0.1,pkg_resources==0.0.0,pluggy==1.0.0,py==1.11.0,pycodestyle==2.8.0,pycparser==2.21,pyflakes==2.4.0,Pygments==2.11.2,requests==2.27.1,restructuredtext-lint==1.4.0,-e git+https://github.com/some_username/simplebot.git@0770380af2493b46d844cd025f44296db976364b#egg=simplebot,six==1.16.0,typing_extensions==4.1.1,urllib3==1.26.8,zipp==3.7.0
lint run-test-pre: PYTHONHASHSEED='507505052'
lint runtests: commands[0] | rst-lint README.rst CHANGELOG.rst
Path "README.rst" not found as a file nor directory
ERROR: InvocationError for command '/home/some_username/simplebot/.tox/lint/bin/rst-lint README.rst CHANGELOG.rst' (exited with code 1)
__________________________________________________________________________________________ summary ___________________________________________________________________________________________
ERROR:   py: commands failed
ERROR:   lint: commands failed
adbenitez commented 2 years ago

I don't use tox, the tox stuff is from the upstream and it is probably unusable currently due to changes in this fork

adbenitez commented 2 years ago

to run test just run pytest in the project root