diff options
| -rw-r--r-- | doc/build/changelog/unreleased_14/8793.rst | 9 | ||||
| -rw-r--r-- | lib/sqlalchemy/testing/plugin/plugin_base.py | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/testing/requirements.py | 4 |
3 files changed, 14 insertions, 1 deletions
diff --git a/doc/build/changelog/unreleased_14/8793.rst b/doc/build/changelog/unreleased_14/8793.rst new file mode 100644 index 000000000..36f1003cc --- /dev/null +++ b/doc/build/changelog/unreleased_14/8793.rst @@ -0,0 +1,9 @@ +.. change:: + :tags: bug, tests + :tickets: 8793 + + 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. diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index b90a2ec58..656a4e98a 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -392,7 +392,7 @@ def _init_symbols(options, file_config): config._fixture_functions = _fixture_fn_class() -@post +@pre def _set_disable_asyncio(opt, file_config): if opt.disable_asyncio: 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: |
