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_8161_test.py: Splitted expected_out again: added separate block for FB 5.x after discuss with dimitr.

This commit is contained in:
pavel-zotov 2024-10-30 11:43:36 +03:00
parent d061161bd1
commit aa32623dbb

View File

@ -25,6 +25,9 @@ NOTES:
for RDB$PROCEDURES table (index on columns: RDB$PACKAGE_NAME,RDB$PROCEDURE_NAME - is unique and at least one of these
columns allow NULLs).
Checked on 6.0.0.502-d2f4cf6, 5.0.2.1542-ab50e20 (intermediate builds).
[30.10.2024] pzotov
Splitted expected_out again: added separate block for FB 5.x after discuss with dimitr.
"""
import zipfile
from pathlib import Path
@ -93,19 +96,39 @@ def test_1(act: Action, tmp_fbk: Path, capsys):
................-> Filter
....................-> Table "RDB$DEPENDENCIES" as "DEP" Access By ID
........................-> Bitmap
............................-> Index "RDB$INDEX_28" Range Scan (full match)
............................-> Index "RDB$INDEX_nn" Range Scan (full match)
................-> Filter
....................-> Table "RDB$PROCEDURES" as "PRC" Access By ID
........................-> Bitmap
............................-> Index "RDB$INDEX_21" Unique Scan
............................-> Index "RDB$INDEX_nn" Unique Scan
Select Expression
....-> Filter
........-> Table "RDB$RELATION_FIELDS" as "X" Access By ID
............-> Bitmap
................-> Index "RDB$INDEX_3" Range Scan (full match)
................-> Index "RDB$INDEX_nn" Range Scan (full match)
"""
expected_stdout_5x = """
Select Expression
....-> Singularity Check
........-> Aggregate
............-> Nested Loop Join (inner)
................-> Filter
....................-> Table "RDB$DEPENDENCIES" as "DEP" Access By ID
........................-> Bitmap
............................-> Index "RDB$INDEX_nn" Range Scan (full match)
................-> Filter
....................-> Table "RDB$PROCEDURES" as "PRC" Access By ID
........................-> Bitmap
............................-> Index "RDB$INDEX_nn" Unique Scan
Select Expression
....-> Filter
........-> Table "RDB$RELATION_FIELDS" as "X" Access By ID
............-> Bitmap
................-> Index "RDB$INDEX_nn" Range Scan (full match)
"""
expected_stdout_6x = """
Select Expression
....-> Singularity Check
........-> Aggregate
@ -125,6 +148,6 @@ def test_1(act: Action, tmp_fbk: Path, capsys):
................-> Index "RDB$INDEX_nn" Range Scan (full match)
"""
act.expected_stdout = expected_stdout_4x if act.is_version('<5') else expected_stdout_5x
act.expected_stdout = expected_stdout_4x if act.is_version('<5') else expected_stdout_5x if act.is_version('<6') else expected_stdout_6x
act.stdout = capsys.readouterr().out
assert act.clean_stdout == act.clean_expected_stdout