diff options
Diffstat (limited to 'lib/sqlalchemy/test/requires.py')
| -rw-r--r-- | lib/sqlalchemy/test/requires.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/sqlalchemy/test/requires.py b/lib/sqlalchemy/test/requires.py index 14c548f12..5b68a18e1 100644 --- a/lib/sqlalchemy/test/requires.py +++ b/lib/sqlalchemy/test/requires.py @@ -252,6 +252,12 @@ def sane_rowcount(fn): skip_if(lambda: not testing.db.dialect.supports_sane_rowcount) ) +def cextensions(fn): + return _chain_decorators_on( + fn, + skip_if(lambda: not _has_cextensions(), "C extensions not installed") + ) + def dbapi_lastrowid(fn): return _chain_decorators_on( fn, @@ -279,7 +285,14 @@ def python2(fn): "Python version 2.xx is required." ) ) - + +def _has_cextensions(): + try: + from sqlalchemy import cresultproxy, cprocessors + return True + except ImportError: + return False + def _has_sqlite(): from sqlalchemy import create_engine try: |
