summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/test
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-11-09 11:40:23 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2010-11-09 11:40:23 -0500
commita41c50ad63f688cce99fdb9920c4f7c24ef0c866 (patch)
treed811319676606ce89642bf316499e101c785b974 /lib/sqlalchemy/test
parent30bc42403754110df1fdec3037c7700cc4f26b70 (diff)
downloadsqlalchemy-a41c50ad63f688cce99fdb9920c4f7c24ef0c866.tar.gz
- Implemented sequence check capability for the C
version of RowProxy, as well as 2.7 style "collections.Sequence" registration for RowProxy. [ticket:1871]
Diffstat (limited to 'lib/sqlalchemy/test')
-rw-r--r--lib/sqlalchemy/test/requires.py15
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: