From c718dea749204169db2b49ea5d18248cbfe6c76f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 18 Apr 2011 12:38:08 -0400 Subject: - Fixed the psycopg2_version parsing in the psycopg2 dialect. --- test/dialect/test_postgresql.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/dialect/test_postgresql.py') diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index e0128a77f..de7169579 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -1245,6 +1245,12 @@ class MiscTest(fixtures.TestBase, AssertsExecutionResults, AssertsCompiledSQL): eq_(testing.db.dialect._get_server_version_info(MockConn(string)), version) + @testing.only_on('postgresql+psycopg2', 'psycopg2-specific feature') + def test_psycopg2_version(self): + v = testing.db.dialect.psycopg2_version + assert testing.db.dialect.dbapi.__version__.\ + startswith(".".join(str(x) for x in v)) + @testing.only_on('postgresql+psycopg2', 'psycopg2-specific feature') def test_notice_logging(self): log = logging.getLogger('sqlalchemy.dialects.postgresql') -- cgit v1.2.1