summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util/concurrency.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-01-02 10:55:21 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2021-01-02 19:08:25 -0500
commit5ba427f6daad4e7224267d11f7c6d99bd68f3d0e (patch)
treea6c7c112c0eb078521b0281c804578a63aa3810f /lib/sqlalchemy/util/concurrency.py
parent2581655c545a0cf705e0347e81cd092896d3207c (diff)
downloadsqlalchemy-5ba427f6daad4e7224267d11f7c6d99bd68f3d0e.tar.gz
Repair async test refactor
in I4940d184a4dc790782fcddfb9873af3cca844398 we reworked how async tests run but apparently the async tests in test/ext/asyncio are reporting success without being run. This patch pushes pytestplugin further so that it won't instrument any test or function overall that declares itself async. This removes the need for the __async_wrap__ flag and also allows us to use a more strict "run_async_test" function that always runs the asyncio event loop from the top. Also start working asyncio into main testing suite. Change-Id: If7144e951a9db67eb7ea73b377f81c4440d39819
Diffstat (limited to 'lib/sqlalchemy/util/concurrency.py')
-rw-r--r--lib/sqlalchemy/util/concurrency.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/util/concurrency.py b/lib/sqlalchemy/util/concurrency.py
index 7b4ff6ba4..c44efba62 100644
--- a/lib/sqlalchemy/util/concurrency.py
+++ b/lib/sqlalchemy/util/concurrency.py
@@ -14,6 +14,9 @@ if compat.py3k:
from ._concurrency_py3k import greenlet_spawn
from ._concurrency_py3k import AsyncAdaptedLock
from ._concurrency_py3k import _util_async_run # noqa F401
+ from ._concurrency_py3k import (
+ _util_async_run_coroutine_function,
+ ) # noqa F401, E501
from ._concurrency_py3k import asyncio # noqa F401
if not have_greenlet:
@@ -42,3 +45,6 @@ if not have_greenlet:
def _util_async_run(fn, *arg, **kw): # noqa F81
return fn(*arg, **kw)
+
+ def _util_async_run_coroutine_function(fn, *arg, **kw): # noqa F81
+ _not_implemented()