summaryrefslogtreecommitdiff
path: root/test/dialect/test_pyodbc.py
blob: 52d6bc7c454723e123a50cec7300b21b44fdf7a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
            )