diff options
author | Gord Thompson <gord@gordthompson.com> | 2021-06-24 12:16:32 -0600 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-07-03 18:50:03 -0400 |
commit | b920869ef54d05e73e2a980b73647d6050ffeb9d (patch) | |
tree | 907f866bf583038751a450e9c6249ef6ff3d0111 /test/engine/test_pool.py | |
parent | cb9f6f83b21b9e65db6cf1ce74f55ecfd0907735 (diff) | |
download | sqlalchemy-b920869ef54d05e73e2a980b73647d6050ffeb9d.tar.gz |
Modernize tests
Eliminate engine.execute() and engine.scalar()
Change-Id: I99f76d0e615ddebab2da4fd07a40a0a2796995c7
Diffstat (limited to 'test/engine/test_pool.py')
-rw-r--r-- | test/engine/test_pool.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py index 70671134f..fa5bd8cff 100644 --- a/test/engine/test_pool.py +++ b/test/engine/test_pool.py @@ -738,7 +738,8 @@ class PoolEventsTest(PoolTestBase): event.listen(engine, "connect", listen_three) event.listen(engine.__class__, "connect", listen_four) - engine.execute(select(1)).close() + with engine.connect() as conn: + conn.execute(select(1)) eq_( canary, ["listen_one", "listen_four", "listen_two", "listen_three"] ) |