summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/fixtures.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing/fixtures.py')
-rw-r--r--lib/sqlalchemy/testing/fixtures.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py
index 1eac76598..1583147d4 100644
--- a/lib/sqlalchemy/testing/fixtures.py
+++ b/lib/sqlalchemy/testing/fixtures.py
@@ -293,13 +293,14 @@ class TablesTest(TestBase):
continue
if table not in headers:
continue
- cls.bind.execute(
- table.insert(),
- [
- dict(zip(headers[table], column_values))
- for column_values in rows[table]
- ],
- )
+ with cls.bind.begin() as conn:
+ conn.execute(
+ table.insert(),
+ [
+ dict(zip(headers[table], column_values))
+ for column_values in rows[table]
+ ],
+ )
class RemovesEvents(object):