-
-
Notifications
You must be signed in to change notification settings - Fork 192
Closed
Description
See the https://github.com/pallets/quart/actions/runs/3320894037
Attribute error about py._path being accessed in the tests:
$ pytest
============================================================ test session starts =============================================================
platform linux -- Python 3.10.6, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/emmanuel/projects/quart/quart, configfile: pyproject.toml, testpaths: tests
plugins: asyncio-0.20.1, cov-4.0.0, hypothesis-6.56.3
asyncio: mode=auto
collected 223 items / 2 errors
=================================================================== ERRORS ===================================================================
___________________________________________________ ERROR collecting tests/test_helpers.py ___________________________________________________
ImportError while importing test module '/home/emmanuel/projects/quart/quart/tests/test_helpers.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_helpers.py:9: in <module>
from py._path.local import LocalPath
E ModuleNotFoundError: No module named 'py._path'; 'py' is not a package
______________________________________________ ERROR collecting tests/wrappers/test_response.py ______________________________________________
ImportError while importing test module '/home/emmanuel/projects/quart/quart/tests/wrappers/test_response.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/wrappers/test_response.py:11: in <module>
from py._path.local import LocalPath
E ModuleNotFoundError: No module named 'py._path'; 'py' is not a package
========================================================== short test summary in
On local with Python3.10, I also got another error due to py coming from pytest-sugar accessing py.std:
$ tox -e py310
py310 inst-nodeps: /home/emmanuel/projects/quart/quart/.tox/.tmp/package/1/quart-0.18.3.tar.gz
py310 installed: aiofiles==22.1.0,attrs==22.1.0,blinker==1.5,click==8.1.3,coverage==6.5.0,exceptiongroup==1.0.0rc9,h11==0.14.0,h2==4.1.0,hpack==4.0.0,hypercorn==0.14.3,hyperframe==6.0.1,hypothesis==6.56.3,iniconfig==1.1.1,itsdangerous==2.1.2,Jinja2==3.1.2,MarkupSafe==2.1.1,packaging==21.3,pluggy==1.0.0,priority==2.0.0,pyparsing==3.0.9,pytest==7.2.0,pytest-asyncio==0.20.1,pytest-cov==4.0.0,pytest-sugar==0.9.5,python-dotenv==0.21.0,quart @ file:///home/emmanuel/projects/quart/quart/.tox/.tmp/package/1/quart-0.18.3.tar.gz,sortedcontainers==2.4.0,termcolor==2.0.1,toml==0.10.2,tomli==2.0.1,Werkzeug==2.2.2,wsproto==1.2.0
py310 run-test-pre: PYTHONHASHSEED='3306379935'
py310 run-test: commands[0] | pytest --cov=quart
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/home/emmanuel/projects/quart/quart/.tox/py310/lib/python3.10/site-packages/_pytest/main.py", line 268, in wrap_session
INTERNALERROR> config.hook.pytest_sessionstart(session=session)
INTERNALERROR> File "/home/emmanuel/projects/quart/quart/.tox/py310/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> File "/home/emmanuel/projects/quart/quart/.tox/py310/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "/home/emmanuel/projects/quart/quart/.tox/py310/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/home/emmanuel/projects/quart/quart/.tox/py310/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/home/emmanuel/projects/quart/quart/.tox/py310/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/home/emmanuel/projects/quart/quart/.tox/py310/lib/python3.10/site-packages/pytest_sugar.py", line 242, in pytest_sessionstart
INTERNALERROR> self._sessionstarttime = py.std.time.time()
INTERNALERROR> AttributeError: module 'py' has no attribute 'std'
Metadata
Metadata
Assignees
Labels
No labels