summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-12-21 10:20:19 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2016-12-21 10:20:19 -0500
commitc19ebfc3dc3f9a707920ee7f3b533d4919eeefb1 (patch)
tree9ca57573d221d7759657217ef4233365ce5393d2
parent910347aef28f662a1f183936624f6f193d87ee6d (diff)
downloadsqlalchemy-c19ebfc3dc3f9a707920ee7f3b533d4919eeefb1.tar.gz
Use session for exec check
This was using a different connection which could deadlock on SQL Server. Change-Id: Ia7953f362c99d9247dd47c3f5c3b0b91c96db1a5
-rw-r--r--test/orm/test_unitofworkv2.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/orm/test_unitofworkv2.py b/test/orm/test_unitofworkv2.py
index b2fefe616..651a9b9ab 100644
--- a/test/orm/test_unitofworkv2.py
+++ b/test/orm/test_unitofworkv2.py
@@ -1307,9 +1307,13 @@ class RowswitchAccountingTest(fixtures.MappedTest):
sess.flush()
eq_(
- select([func.count('*')]).select_from(self.tables.parent).scalar(),
- 0)
+ sess.scalar(
+ select([func.count('*')]).select_from(self.tables.parent)
+ ),
+ 0
+ )
+ sess.close()
class RowswitchM2OTest(fixtures.MappedTest):
# tests for #3060 and related issues