summaryrefslogtreecommitdiff
path: root/test/engine/test_pool.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-04-30 20:20:02 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-04-30 20:20:02 -0400
commit4992aafecceb7a6301cfa4926bc709c873f37cc7 (patch)
tree3e8b944f4918aa2fbd26cedbe01db740d0a2a340 /test/engine/test_pool.py
parente0f9b279f43759886c61e6c82f97d95d0093fdf7 (diff)
downloadsqlalchemy-4992aafecceb7a6301cfa4926bc709c873f37cc7.tar.gz
- revise the last commit with a more traditional approach
using descriptors; ensure that mock.patch() honors descriptor setters
Diffstat (limited to 'test/engine/test_pool.py')
-rw-r--r--test/engine/test_pool.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py
index 912c6c3fe..3684fc3e6 100644
--- a/test/engine/test_pool.py
+++ b/test/engine/test_pool.py
@@ -1844,21 +1844,16 @@ class CreatorCompatibilityTest(PoolTestBase):
conn.invalidate()
conn.close()
- # test that the 'should_wrap_creator' memoized attribute
+ # test that the 'should_wrap_creator' status
# will dynamically switch if the _creator is monkeypatched.
- is_(e.pool.__dict__.get("_should_wrap_creator")[0], False)
-
# patch it with a zero-arg form
with patch.object(e.pool, "_creator", mock_create):
conn = e.connect()
conn.invalidate()
conn.close()
- is_(e.pool.__dict__.get("_should_wrap_creator")[0], True)
-
conn = e.connect()
conn.close()
- is_(e.pool.__dict__.get("_should_wrap_creator")[0], False)