diff options
Diffstat (limited to 'lib/sqlalchemy/testing/fixtures.py')
-rw-r--r-- | lib/sqlalchemy/testing/fixtures.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py index 0ede25176..a52fdd196 100644 --- a/lib/sqlalchemy/testing/fixtures.py +++ b/lib/sqlalchemy/testing/fixtures.py @@ -48,6 +48,11 @@ class TestBase(object): # skipped. __skip_if__ = None + # If this class should be wrapped in asyncio compatibility functions + # when using an async engine. This should be set to False only for tests + # that use the asyncio features of sqlalchemy directly + __asyncio_wrap__ = True + def assert_(self, val, msg=None): assert val, msg @@ -90,6 +95,12 @@ class TestBase(object): # engines.drop_all_tables(metadata, config.db) +class AsyncTestBase(TestBase): + """Mixin marking a test as using its own explicit asyncio patterns.""" + + __asyncio_wrap__ = False + + class FutureEngineMixin(object): @classmethod def setup_class(cls): |