summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/assertions.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-03-26 19:15:49 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-03-26 19:15:49 -0400
commitbd86942b058681fbe87f7315dc9fa69642159506 (patch)
tree72b4b9489a406798b9b17617a8667184a5fbe229 /lib/sqlalchemy/testing/assertions.py
parent99d07abe1704c67f76e67afc225dcf0b90fa768b (diff)
downloadsqlalchemy-bd86942b058681fbe87f7315dc9fa69642159506.tar.gz
dont warn, that just crashes the test...
Diffstat (limited to 'lib/sqlalchemy/testing/assertions.py')
-rw-r--r--lib/sqlalchemy/testing/assertions.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index 0a65a1b7c..edc9df047 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -149,11 +149,12 @@ def _assert_no_stray_pool_connections():
# however, once in awhile, on an EC2 machine usually,
# there's a ref in there. usually just one.
if pool._refs:
+
# OK, let's be somewhat forgiving. Increment a counter,
# we'll allow a couple of these at most.
_STRAY_CONNECTION_FAILURES += 1
- util.warn("Encountered a stray connection in test cleanup: %s"
+ print("Encountered a stray connection in test cleanup: %s"
% str(pool._refs))
# then do a real GC sweep. We shouldn't even be here
# so a single sweep should really be doing it, otherwise
@@ -171,7 +172,7 @@ def _assert_no_stray_pool_connections():
# so the error doesn't at least keep happening.
pool._refs.clear()
_STRAY_CONNECTION_FAILURES = 0
- assert False, err
+ assert False, "Stray conections in cleanup: %s" % err
def eq_(a, b, msg=None):