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

Added/Updated tests\bugs\gh_7804_test.py: Result in 6.x became equal to 5.x. Removed separation of expected* output. Checked on 6.0.0.587-90401f7

This commit is contained in:
pavel-zotov 2025-01-19 17:06:57 +03:00
parent e3d12fe36e
commit 7f8f2804a9

View File

@ -31,11 +31,15 @@ NOTES:
Output for FB 6.x will be changed later (letter from dimitr, 16.12.2023 10:32) Output for FB 6.x will be changed later (letter from dimitr, 16.12.2023 10:32)
[18.01.2025] pzotov [18.01.2025] pzotov
Resultset of cursor that executes using instance of selectable PreparedStatement must be stored Resultset of cursor that executes using instance of selectable PreparedStatement must be stored
in some variable in order to have ability close it EXPLICITLY (before PS will be freed). in some variable in order to have ability close it EXPLICITLY (before PS will be freed).
Otherwise access violation raises during Python GC and pytest hangs at final point (does not return control to OS). Otherwise access violation raises during Python GC and pytest hangs at final point (does not return control to OS).
This occurs at least for: Python 3.11.2 / pytest: 7.4.4 / firebird.driver: 1.10.6 / Firebird.Qa: 0.19.3 This occurs at least for: Python 3.11.2 / pytest: 7.4.4 / firebird.driver: 1.10.6 / Firebird.Qa: 0.19.3
The reason of that was explained by Vlad, 26.10.24 17:42 ("oddities when use instances of selective statements"). The reason of that was explained by Vlad, 26.10.24 17:42 ("oddities when use instances of selective statements").
[19.01.2025] pzotov
Result in 6.x became equal to 5.x. Removed separation of expected* output
Checked on 6.0.0.587-90401f7
""" """
import pytest import pytest
@ -141,7 +145,7 @@ def test_1(act: Action, capsys):
#-------------------------------------------------------------------- #--------------------------------------------------------------------
expected_fb5x = f""" expected_out = f"""
Query: {q_list[0]} Query: {q_list[0]}
Select Expression Select Expression
....-> Filter ....-> Filter
@ -251,99 +255,6 @@ def test_1(act: Action, capsys):
IR: 4000 IR: 4000
""" """
act.expected_stdout = expected_out
expected_fb6x = f"""
Query: {q_list[0]}
Select Expression
....-> Filter
........-> Table "TEST" Access By ID
............-> Bitmap
................-> Index "TEST_X_ASC" Range Scan (full match)
NR: 0
IR: 1000
Query: {q_list[1]}
Select Expression
....-> Filter
........-> Table "TEST" Access By ID
............-> Bitmap Or
................-> Bitmap
....................-> Index "TEST_X_ASC" Range Scan (full match)
................-> Bitmap
....................-> Index "TEST_X_ASC" Range Scan (full match)
NR: 0
IR: 2000
Query: {q_list[2]}
Select Expression
....-> Filter
........-> Table "TEST" Access By ID
............-> Bitmap Or
................-> Bitmap Or
....................-> Bitmap
........................-> Index "TEST_X_ASC" Range Scan (full match)
....................-> Bitmap
........................-> Index "TEST_X_ASC" Range Scan (full match)
................-> Bitmap
....................-> Index "TEST_X_ASC" Range Scan (full match)
NR: 0
IR: 3000
Query: {q_list[3]}
Select Expression
....-> Filter
........-> Table "TEST" Access By ID
............-> Bitmap
................-> Index "TEST_X_ASC" Full Scan
NR: 0
IR: 4000
Query: {q_list[4]}
Select Expression
....-> Filter
........-> Table "TEST" Access By ID
............-> Bitmap
................-> Index "TEST_X_DEC" Range Scan (full match)
NR: 0
IR: 1000
Query: {q_list[5]}
Select Expression
....-> Filter
........-> Table "TEST" Access By ID
............-> Bitmap Or
................-> Bitmap
....................-> Index "TEST_X_DEC" Range Scan (full match)
................-> Bitmap
....................-> Index "TEST_X_DEC" Range Scan (full match)
NR: 0
IR: 2000
Query: {q_list[6]}
Select Expression
....-> Filter
........-> Table "TEST" Access By ID
............-> Bitmap Or
................-> Bitmap Or
....................-> Bitmap
........................-> Index "TEST_X_DEC" Range Scan (full match)
....................-> Bitmap
........................-> Index "TEST_X_DEC" Range Scan (full match)
................-> Bitmap
....................-> Index "TEST_X_DEC" Range Scan (full match)
NR: 0
IR: 3000
Query: {q_list[7]}
Select Expression
....-> Filter
........-> Table "TEST" Access By ID
............-> Bitmap
................-> Index "TEST_X_DEC" Full Scan
NR: 0
IR: 4000
"""
act.expected_stdout = expected_fb5x if act.is_version('<6') else expected_fb6x
act.stdout = capsys.readouterr().out act.stdout = capsys.readouterr().out
assert act.clean_stdout == act.clean_expected_stdout assert act.clean_stdout == act.clean_expected_stdout