Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI tests failing on master (…again) #698

Closed
LeXofLeviafan opened this issue Oct 16, 2023 · 1 comment · Fixed by #699
Closed

CI tests failing on master (…again) #698

LeXofLeviafan opened this issue Oct 16, 2023 · 1 comment · Fixed by #699
Labels

Comments

@LeXofLeviafan
Copy link
Collaborator

When running tests locally via tox on a clean venv, the unit tests fail during initialization, apparently due to another dependency versions conflict.

(error log)
ImportError while importing test module '/home/lex/Work/buku/tests/test_views.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.tox/python311/lib/python3.11/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
.tox/python311/lib/python3.11/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1204: in _gcd_import
    ???
<frozen importlib._bootstrap>:1176: in _find_and_load
    ???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
.tox/python311/lib/python3.11/site-packages/_pytest/assertion/rewrite.py:178: in exec_module
    exec(co, module.__dict__)
tests/test_views.py:13: in <module>
    from bukuserver import server
bukuserver/server.py:11: in <module>
    from flask_api import FlaskAPI, status
.tox/python311/lib/python3.11/site-packages/flask_api/__init__.py:1: in <module>
    from flask_api.app import FlaskAPI
.tox/python311/lib/python3.11/site-packages/flask_api/app.py:10: in <module>
    from flask_api.request import APIRequest
.tox/python311/lib/python3.11/site-packages/flask_api/request.py:5: in <module>
    from werkzeug.urls import url_decode_stream
E   ImportError: cannot import name 'url_decode_stream' from 'werkzeug.urls'

The same error happens in CI as well.


Also, pylint prints warnings about using return within finally: block (here and here); which is understandable considering the dubious behaviour of such combinations. I believe these should be moved out of their respective finally: blocks.

(…There's also a warning about “inconsistent return statements,” but it goes away once return-in-finally is fixed.)

@LeXofLeviafan
Copy link
Collaborator Author

…The error was caused by this issue in Flask-API.

jarun added a commit that referenced this issue Oct 17, 2023
[#698] fixed dependencies & improved testing time
@github-actions github-actions bot locked and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant