]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
dont warn, that just crashes the test...
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Mar 2014 23:15:49 +0000 (19:15 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Mar 2014 23:15:49 +0000 (19:15 -0400)
lib/sqlalchemy/testing/assertions.py

index 0a65a1b7c26d5bf686d935b22196a95d8d43068a..edc9df047b7e09cdf92dda9f8fe138045805d3c2 100644 (file)
@@ -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):