-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Description
Bug report
Bug description:
The bug is rather strange, it only occurs when starting the tests outside of the environment I use for development.
You easily try by running the following commands:
py -3.12 -m pip install aplustools --upgrade
upype import aplustools; aplustools.install_all_dependencies()
py -3.12 -m pip cache purge
py -3.12 -m pip install asyncio --upgrade
run_apt_tests
Heres what that resulted in for me:
...
C:\Users\user_>py -3.12 -m pip cache purge
Files removed: 438
C:\Users\user_>py -3.12 -m pip install asyncio --upgrade
Collecting asyncio
Downloading asyncio-3.4.3-py3-none-any.whl.metadata (1.7 kB)
Downloading asyncio-3.4.3-py3-none-any.whl (101 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.8/101.8 kB 1.5 MB/s eta 0:00:00
Installing collected packages: asyncio
Successfully installed asyncio-3.4.3
C:\Users\user_>run_apt_tests
Ensuring pytest is installed...
C:\Users\user_\AppData\Local\Programs\Python\Python312\python.exe -m pip install pytest
Requirement already satisfied: pytest in c:\users\user_\appdata\local\programs\python\python312\lib\site-packages (7.4.4)
Requirement already satisfied: iniconfig in c:\users\user_\appdata\local\programs\python\python312\lib\site-packages (from pytest) (2.0.0)
Requirement already satisfied: packaging in c:\users\user_\appdata\local\programs\python\python312\lib\site-packages (from pytest) (23.2)
Requirement already satisfied: pluggy<2.0,>=0.12 in c:\users\user_\appdata\local\programs\python\python312\lib\site-packages (from pytest) (1.4.0)
Requirement already satisfied: colorama in c:\users\user_\appdata\local\programs\python\python312\lib\site-packages (from pytest) (0.4.6)
Clearing directory test_data...
Creating directory test_data...
Running tests...
================================================= test session starts =================================================
platform win32 -- Python 3.12.1, pytest-7.4.4, pluggy-1.4.0 -- C:\Users\user_\AppData\Local\Programs\Python\Python312\python.exe
cachedir: .pytest_cache
rootdir: C:\Users\user_\AppData\Local\Programs\Python\Python312\Lib\site-packages\aplustools
plugins: anyio-4.2.0
collected 10 items / 2 errors
======================================================= ERRORS ========================================================
_________________________________________ ERROR collecting tests/test_data.py _________________________________________
.._pytest\python.py:617: in importtestmodule
mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
.._pytest\pathlib.py:567: in import_path
importlib.import_module(module_name)
....\importlib_init.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
:1387: in _gcd_import
???
:1360: in find_and_load
???
:1331: in find_and_load_unlocked
???
:935: in load_unlocked
???
.._pytest\assertion\rewrite.py:186: in exec_module
exec(co, module.dict)
tests\test_data.py:1: in
from aplustools.data import database, imagetools, updaters, faker
data\imagetools.py:5: in
from aiohttp import ClientSession
..\aiohttp_init.py:6: in
from .client import (
..\aiohttp\client.py:3: in
import asyncio
..\asyncio_init.py:21: in
from .base_events import *
E File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\asyncio\base_events.py", line 296
E future = tasks.async(future, loop=self)
E ^^^^^
E SyntaxError: invalid syntax
_______________________________________ ERROR collecting tests/test_general.py ________________________________________
.._pytest\python.py:617: in importtestmodule
mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
.._pytest\pathlib.py:567: in import_path
importlib.import_module(module_name)
....\importlib_init.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
:1387: in _gcd_import
???
:1360: in _find_and_load
???
:1331: in find_and_load_unlocked
???
:935: in load_unlocked
???
.._pytest\assertion\rewrite.py:186: in exec_module
exec(co, module.dict)
tests\test_general.py:2: in
from aplustools.web import web_request
web\web_request.py:8: in
import asyncio
..\asyncio_init.py:21: in
from .base_events import *
E File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\asyncio\base_events.py", line 296
E future = tasks.async(future, loop=self)
E ^^^^^
E SyntaxError: invalid syntax
CPython versions tested on:
3.12
Operating systems tested on:
Windows
Metadata
Metadata
Assignees
Labels
Projects
Status