Closed
Description
When running the test suite on Python 3.10, a number of tests trigger a DeprecationWarning:
$ tox -e py310
GLOB sdist-make: /tmp/pytest-asyncio/setup.py
py310 create: /tmp/pytest-asyncio/.tox/py310
py310 inst: /tmp/pytest-asyncio/.tox/.tmp/package/1/pytest-asyncio-0.16.0.dev0.zip
py310 installed: attrs==21.2.0,coverage==5.5,hypothesis==6.12.0,iniconfig==1.1.1,packaging==20.9,pluggy==0.13.1,py==1.10.0,pyparsing==2.4.7,pytest==6.2.4,pytest-asyncio @ file:///tmp/pytest-asyncio/.tox/.tmp/package/1/pytest-asyncio-0.16.0.dev0.zip,sortedcontainers==2.3.0,toml==0.10.2
py310 run-test-pre: PYTHONHASHSEED='2588140742'
py310 run-test: commands[0] | coverage run -m pytest
============================================================== test session starts ===============================================================
platform linux -- Python 3.10.0b1, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
cachedir: .tox/py310/.pytest_cache
rootdir: /tmp/pytest-asyncio, configfile: setup.cfg, testpaths: tests
plugins: asyncio-0.16.0.dev0, hypothesis-6.12.0
collected 41 items
tests/test_dependent_fixtures.py .. [ 4%]
tests/test_event_loop_scope.py F.F [ 12%]
tests/test_hypothesis_integration.py EEEEE [ 24%]
tests/test_simple.py ..x.....E...s. [ 58%]
tests/test_subprocess.py .. [ 63%]
tests/async_fixtures/test_async_fixtures.py . [ 65%]
tests/async_fixtures/test_async_fixtures_scope.py . [ 68%]
tests/async_fixtures/test_async_fixtures_with_finalizer.py ..E [ 73%]
tests/async_fixtures/test_async_gen_fixtures.py .. [ 78%]
tests/async_fixtures/test_coroutine_fixtures.py s [ 80%]
tests/async_fixtures/test_nested.py . [ 82%]
tests/markers/test_class_marker.py . [ 85%]
tests/markers/test_module_marker.py .. [ 90%]
tests/multiloop/test_alternative_loops.py .. [ 95%]
tests/sessionloop/test_session_loops.py .. [100%]
===================================================================== ERRORS =====================================================================
_______________________________________________________ ERROR at setup of test_mark_inner ________________________________________________________
tests/test_hypothesis_integration.py:13: in event_loop
loop = asyncio.get_event_loop()
E DeprecationWarning: There is no current event loop
_______________________________________________________ ERROR at setup of test_mark_outer ________________________________________________________
tests/test_hypothesis_integration.py:13: in event_loop
loop = asyncio.get_event_loop()
E DeprecationWarning: There is no current event loop
_________________________________________________ ERROR at setup of test_mark_and_parametrize[1] _________________________________________________
tests/test_hypothesis_integration.py:13: in event_loop
loop = asyncio.get_event_loop()
E DeprecationWarning: There is no current event loop
_________________________________________________ ERROR at setup of test_mark_and_parametrize[2] _________________________________________________
tests/test_hypothesis_integration.py:13: in event_loop
loop = asyncio.get_event_loop()
E DeprecationWarning: There is no current event loop
___________________________________________ ERROR at setup of test_can_use_fixture_provided_event_loop ___________________________________________
tests/test_hypothesis_integration.py:13: in event_loop
loop = asyncio.get_event_loop()
E DeprecationWarning: There is no current event loop
_____________________________________ ERROR at setup of TestUnexistingLoop.test_asyncio_marker_without_loop ______________________________________
tests/test_simple.py:115: in remove_loop
old_loop = asyncio.get_event_loop()
E DeprecationWarning: There is no current event loop
_________________________________________ ERROR at teardown of test_module_with_get_event_loop_finalizer _________________________________________
tests/async_fixtures/test_async_fixtures_with_finalizer.py:51: in port_finalizer
asyncio.get_event_loop().run_until_complete(port_afinalizer())
E DeprecationWarning: There is no current event loop
==================================================================== FAILURES ====================================================================
_____________________________________________________________________ test_1 _____________________________________________________________________
tests/test_event_loop_scope.py:11: in test_1
loop = asyncio.get_event_loop()
E DeprecationWarning: There is no current event loop
_____________________________________________________________________ test_3 _____________________________________________________________________
tests/test_event_loop_scope.py:21: in test_3
loop = asyncio.get_event_loop()
E DeprecationWarning: There is no current event loop
============================================================ short test summary info =============================================================
SKIPPED [1] tests/test_simple.py:151: Test a skip error inside asyncio
SKIPPED [1] tests/async_fixtures/test_coroutine_fixtures.py:25: @asyncio.coroutine fixtures are not supported yet
XFAIL tests/test_simple.py::test_asyncio_marker_fail
need a failure
========================================== 2 failed, 30 passed, 2 skipped, 1 xfailed, 7 errors in 1.79s ==========================================
Task was destroyed but it is pending!
task: <Task pending name='Task-45' coro=<sleep() done, defined at /usr/lib/python3.10/asyncio/tasks.py:597> wait_for=<Future pending cb=[Task.task_wakeup()]>>
ERROR: InvocationError for command /tmp/pytest-asyncio/.tox/py310/bin/coverage run -m pytest (exited with code 1)
____________________________________________________________________ summary _____________________________________________________________________
ERROR: py310: commands failed
Metadata
Metadata
Assignees
Labels
No labels