6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00

Update tests\bugs\core_5845_test.py: Made the test more reliable. Perform prepare using the with manager to avoid uncontrolled deletion of the Statement object.

This commit is contained in:
Anton Zuev 2024-11-12 15:27:31 +03:00
parent 4b5d84aba7
commit 5bc287b514

View File

@ -88,9 +88,9 @@ def test_1(act: Action, capsys):
with act.db.connect() as con:
cur = con.cursor()
for q in chk_qry_map.keys():
ps = cur.prepare(q)
print( q )
print( ps.plan )
with cur.prepare(q) as ps:
print( q )
print( ps.plan )
act.expected_stdout = '\n'.join(expected_plans_lst)
act.stdout = capsys.readouterr().out