summaryrefslogtreecommitdiff
path: root/test/dialect/test_pyodbc.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-12-04 13:29:29 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-12-04 13:29:29 -0500
commit3867ea9dc7b432f84d29496c1824486b14cd8bfa (patch)
treedc3ca7e039d6e7b3dbf4906bb9781fb44038a017 /test/dialect/test_pyodbc.py
parent00b7f8be52d756136a2ef71f192fc37f3b6229b7 (diff)
downloadsqlalchemy-3867ea9dc7b432f84d29496c1824486b14cd8bfa.tar.gz
- [bug] pyodbc-based dialects now parse the
pyodbc accurately as far as observed pyodbc strings, including such gems as "py3-3.0.1-beta4" [ticket:2318] - [bug] use new pyodbc version detection for _need_decimal_fix option, [ticket:2318]
Diffstat (limited to 'test/dialect/test_pyodbc.py')
-rw-r--r--test/dialect/test_pyodbc.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/dialect/test_pyodbc.py b/test/dialect/test_pyodbc.py
new file mode 100644
index 000000000..c2aec726b
--- /dev/null
+++ b/test/dialect/test_pyodbc.py
@@ -0,0 +1,17 @@
+from test.lib.testing import eq_
+from sqlalchemy.connectors import pyodbc
+from test.lib import fixtures
+
+class PyODBCTest(fixtures.TestBase):
+ def test_pyodbc_version(self):
+ connector = pyodbc.PyODBCConnector()
+ for vers, expected in [
+ ('2.1.8', (2, 1, 8)),
+ ("py3-3.0.1-beta4", (3, 0, 1, 'beta4')),
+ ("10.15.17", (10, 15, 17)),
+ ("crap.crap.crap", ()),
+ ]:
+ eq_(
+ connector._parse_dbapi_version(vers),
+ expected
+ ) \ No newline at end of file