From 83c8231ac1821703a2ec7f07bbd68e8712101e73 Mon Sep 17 00:00:00 2001 From: Gord Thompson Date: Sat, 28 Mar 2020 17:34:05 -0600 Subject: Clean up .execute calls in PostgreSQL tests Fixes: #5220 Change-Id: I789e45dffc2b177ebb15ea3268bb965be8b06397 --- test/dialect/postgresql/test_compiler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/dialect/postgresql/test_compiler.py') diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py index 316f0c240..4cc9c837d 100644 --- a/test/dialect/postgresql/test_compiler.py +++ b/test/dialect/postgresql/test_compiler.py @@ -87,8 +87,9 @@ class SequenceTest(fixtures.TestBase, AssertsCompiledSQL): Column(cname[:57], Integer, primary_key=True), ) t.create(engine) - r = engine.execute(t.insert()) - assert r.inserted_primary_key == [1] + with engine.begin() as conn: + r = conn.execute(t.insert()) + assert r.inserted_primary_key == [1] class CompileTest(fixtures.TestBase, AssertsCompiledSQL): -- cgit v1.2.1