summaryrefslogtreecommitdiff
path: root/test/dialect/test_postgresql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-08-14 20:52:57 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-08-14 20:52:57 -0400
commitdc31eb352aed6b578b7cf0bbc0d4290b6d11f2b2 (patch)
treef57fb2bf5a70d46aa0515ad488195d5d1f3e93c0 /test/dialect/test_postgresql.py
parent504fd37d6848005730c8c68769ba9e06f83551dc (diff)
parentff1d504fc4b7df2284b9f261cd03a7568b7038e8 (diff)
downloadsqlalchemy-dc31eb352aed6b578b7cf0bbc0d4290b6d11f2b2.tar.gz
merge tip
Diffstat (limited to 'test/dialect/test_postgresql.py')
-rw-r--r--test/dialect/test_postgresql.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py
index 86b3617ab..a605594d4 100644
--- a/test/dialect/test_postgresql.py
+++ b/test/dialect/test_postgresql.py
@@ -1325,9 +1325,23 @@ class MiscTest(TestBase, AssertsExecutionResults, AssertsCompiledSQL):
isolation_level='SERIALIZABLE')
eq_(eng.execute('show transaction isolation level').scalar(),
'serializable')
+
+ # check that it stays
+ conn = eng.connect()
+ eq_(conn.execute('show transaction isolation level').scalar(),
+ 'serializable')
+ conn.close()
+
+ conn = eng.connect()
+ eq_(conn.execute('show transaction isolation level').scalar(),
+ 'serializable')
+ conn.close()
+
eng = create_engine(testing.db.url, isolation_level='FOO')
if testing.db.driver == 'zxjdbc':
exception_cls = eng.dialect.dbapi.Error
+ elif testing.db.driver == 'psycopg2':
+ exception_cls = exc.InvalidRequestError
else:
exception_cls = eng.dialect.dbapi.ProgrammingError
assert_raises(exception_cls, eng.execute,