diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-11-11 09:46:06 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-11-11 11:20:34 -0500 |
commit | 604611e7e522269ee11b314fb6fb75873a465494 (patch) | |
tree | 8043f3b9cf36b493ac6686af1c7a40cd9252f9cb /lib/sqlalchemy/testing/requirements.py | |
parent | e3a8d198917f4246365e09fa975d55c64082cd2e (diff) | |
download | sqlalchemy-604611e7e522269ee11b314fb6fb75873a465494.tar.gz |
repair --disable-asyncio parameter
Fixed issue where the ``--disable-asyncio`` parameter to the test suite
would fail to not actually run greenlet tests and would also not prevent
the suite from using a "wrapping" greenlet for the whole suite. This
parameter now ensures that no greenlet or asyncio use will occur within the
entire run when set.
Fixes: #8793
Change-Id: I87b510846b2cc24413cd54e7b7136e91aad3c309
Diffstat (limited to 'lib/sqlalchemy/testing/requirements.py')
-rw-r--r-- | lib/sqlalchemy/testing/requirements.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 5b3443d1a..38d962fef 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -21,6 +21,7 @@ from __future__ import annotations import platform +from . import asyncio as _test_asyncio from . import config from . import exclusions from . import only_on @@ -1509,6 +1510,9 @@ class SuiteRequirements(Requirements): @property def greenlet(self): def go(config): + if not _test_asyncio.ENABLE_ASYNCIO: + return False + try: import greenlet # noqa: F401 except ImportError: |