From 930c066776748c648af31085aff83befa5624843 Mon Sep 17 00:00:00 2001 From: Tony Locke Date: Sun, 28 Apr 2024 14:54:13 +0100 Subject: [PATCH] i --- test/dbapi/test_connection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/dbapi/test_connection.py b/test/dbapi/test_connection.py index d118e87..623fcdf 100644 --- a/test/dbapi/test_connection.py +++ b/test/dbapi/test_connection.py @@ -79,7 +79,8 @@ def test_password_bytes(con, db_kwargs): db_kwargs["password"] = password.encode("utf8") db_kwargs["database"] = "pg8000_md5" with pytest.raises(DatabaseError, match="3D000"): - connect(**db_kwargs) + with connect(**db_kwargs): + pass cur.execute("drop role " + username) con.commit()