summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/engines.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing/engines.py')
-rw-r--r--lib/sqlalchemy/testing/engines.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/engines.py b/lib/sqlalchemy/testing/engines.py
index 7404befb8..d17e30edf 100644
--- a/lib/sqlalchemy/testing/engines.py
+++ b/lib/sqlalchemy/testing/engines.py
@@ -59,6 +59,12 @@ class ConnectionKiller(object):
# not sure if this should be if pypy/jython only.
# note that firebird/fdb definitely needs this though
for conn, rec in list(self.conns):
+ if rec.connection is None:
+ # this is a hint that the connection is closed, which
+ # is causing segfaults on mysqlclient due to
+ # https://github.com/PyMySQL/mysqlclient-python/issues/270;
+ # try to work around here
+ continue
self._safe(conn.rollback)
def _stop_test_ctx(self):