You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this parameter has been removed in 0.6.0 (back in 2017), and pytest-asyncio 0.24.0 (currently alpha) actually errors when it is specified:
$ USE_ASYNCIO=1 pytest autobahn/wamp/
/tmp/autobahn-python/.tox/py311-asyncio/lib/python3.11/site-packages/pytest_asyncio/plugin.py:212: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
=============================================================== ERRORS ================================================================
___________________________________ ERROR collecting autobahn/wamp/test/test_wamp_component_aio.py ____________________________________
.tox/py311-asyncio/lib/python3.11/site-packages/pytest_asyncio/plugin.py:691: in _patched_collect
return collector.__original_collect()
.tox/py311-asyncio/lib/python3.11/site-packages/_pytest/python.py:552: in collect
returnsuper().collect()
.tox/py311-asyncio/lib/python3.11/site-packages/_pytest/python.py:419: in collect
res = ihook.pytest_pycollect_makeitem(
.tox/py311-asyncio/lib/python3.11/site-packages/pluggy/_hooks.py:513: in __call__
returnself._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
.tox/py311-asyncio/lib/python3.11/site-packages/pluggy/_manager.py:120: in _hookexec
returnself._inner_hookexec(hook_name, methods, kwargs, firstresult)
.tox/py311-asyncio/lib/python3.11/site-packages/pytest_asyncio/plugin.py:576: in pytest_pycollect_makeitem_convert_async_functions_to_subclass
] = hook_result.get_result()
.tox/py311-asyncio/lib/python3.11/site-packages/_pytest/python.py:245: in pytest_pycollect_makeitem
returnlist(collector._genfunctions(name, obj))
.tox/py311-asyncio/lib/python3.11/site-packages/_pytest/python.py:462: in _genfunctions
self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
.tox/py311-asyncio/lib/python3.11/site-packages/pluggy/_hooks.py:574: in call_extra
returnself._hookexec(self.name, hookimpls, kwargs, firstresult)
.tox/py311-asyncio/lib/python3.11/site-packages/pluggy/_manager.py:120: in _hookexec
returnself._inner_hookexec(hook_name, methods, kwargs, firstresult)
.tox/py311-asyncio/lib/python3.11/site-packages/pytest_asyncio/plugin.py:742: in pytest_generate_tests
scope = _get_marked_loop_scope(marker)
.tox/py311-asyncio/lib/python3.11/site-packages/pytest_asyncio/plugin.py:1010: in _get_marked_loop_scope
raiseValueError("mark.asyncio accepts only a keyword argument 'scope'.")
E ValueError: mark.asyncio accepts only a keyword argument 'scope'.
========================================================== warnings summary ===========================================================
.tox/py311-asyncio/lib/python3.11/site-packages/passlib/utils/__init__.py:854
/tmp/autobahn-python/.tox/py311-asyncio/lib/python3.11/site-packages/passlib/utils/__init__.py:854: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
from crypt import crypt as _crypt
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================= short test summary info =======================================================
ERROR autobahn/wamp/test/test_wamp_component_aio.py - ValueError: mark.asyncio accepts only a keyword argument 'scope'.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The tests are using
@pytest.mark.asyncio(forbid_global_loop=True)
, e.g.:autobahn-python/autobahn/wamp/test/test_wamp_component_aio.py
Line 37 in f38f16b
However, this parameter has been removed in 0.6.0 (back in 2017), and pytest-asyncio 0.24.0 (currently alpha) actually errors when it is specified:
To reproduce (the easy way):
The text was updated successfully, but these errors were encountered: