Skip to content

Commit

Permalink
Address review: use idiomatic approach
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Apr 18, 2024
1 parent eb582a0 commit 1280ee6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/test/test_sqlite3/test_dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,11 +895,11 @@ def test_execute_indexed_nameless_params(self):
("select ?2, ?1", (1, 2), (2, 1)),
):
with self.subTest(query=query, params=params):
with warnings.catch_warnings(record=True) as cm:
with warnings.catch_warnings(record=True):
warnings.simplefilter("error", DeprecationWarning)
cu = self.cu.execute(query, params)
actual, = cu.fetchall()
self.assertEqual(actual, expected)
self.assertEqual(cm, [])

def test_execute_too_many_params(self):
category = sqlite.SQLITE_LIMIT_VARIABLE_NUMBER
Expand Down

0 comments on commit 1280ee6

Please sign in to comment.