summaryrefslogtreecommitdiff
path: root/test/base/test_concurrency_py3k.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-05-26 13:46:36 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-05-27 12:12:56 -0400
commitff1d989c1433c96ac1a50c3662e77ec1025c57cb (patch)
tree53d40e9839597f84aef668a860bf838fa6264c53 /test/base/test_concurrency_py3k.py
parent37db4530baaedfff078c5ced83e088bd631a8d75 (diff)
downloadsqlalchemy-ff1d989c1433c96ac1a50c3662e77ec1025c57cb.tar.gz
get tests to pass on python 3.10
Resolved various deprecation warnings which were appearing as of Python version 3.10.0b1. block aiomysql on python 3.10 as they are using the "loop" argument that's removed sqlcipher-binary has no builds on 3.10, block it for 3.10 Fixes: #6540 Fixes: #6543 Change-Id: Iec1e3881fb289878881ae043b1a18c3ecdf5f077
Diffstat (limited to 'test/base/test_concurrency_py3k.py')
-rw-r--r--test/base/test_concurrency_py3k.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/base/test_concurrency_py3k.py b/test/base/test_concurrency_py3k.py
index 08c18b43e..9eba6b82f 100644
--- a/test/base/test_concurrency_py3k.py
+++ b/test/base/test_concurrency_py3k.py
@@ -11,6 +11,7 @@ from sqlalchemy.testing import is_true
from sqlalchemy.util import asyncio
from sqlalchemy.util import await_fallback
from sqlalchemy.util import await_only
+from sqlalchemy.util import compat
from sqlalchemy.util import greenlet_spawn
from sqlalchemy.util import queue
@@ -192,10 +193,15 @@ class TestAsyncAdaptedQueue(fixtures.TestBase):
eq_(q.get(block=False), 1)
q.get(timeout=0.1)
- with expect_raises_message(
- RuntimeError, "Task .* attached to a different loop"
- ):
- asyncio.run(greenlet_spawn(go))
+ if compat.py310:
+ # TODO: I don't really know what this means in 3.10
+ with expect_raises(queue.Empty):
+ asyncio.run(greenlet_spawn(go))
+ else:
+ with expect_raises_message(
+ RuntimeError, "Task .* attached to a different loop"
+ ):
+ asyncio.run(greenlet_spawn(go))
run[0] = True