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_7482_test.py: Added 'SQLSTATE' in substitutions: runtime error must not be suppressed. Added 'combine_output = True' in order to see SQLSTATE if any error occurs.

This commit is contained in:
pavel-zotov 2023-12-14 19:44:34 +03:00
parent de8441585c
commit 584440cc6c

View File

@ -6,14 +6,18 @@ ISSUE: https://github.com/FirebirdSQL/firebird/issues/7482
TITLE: Result of blob_append(null, null) (literal '<null>') is not shown
NOTES:
[14.02.2023] pzotov
Checked on 5.0.0.958, intermediate build of 24-feb-2023. All OK.
Checked on 5.0.0.958, intermediate build of 24-feb-2023. All OK.
[03.03.2023] pzotov
Added substitution for suppressing 'Nullable' flags in the SQLDA output: it is sufficient for this test
to check only datatypes of result.
Discussed with Vlad, letters 02-mar-2023 16:01 and 03-mar-2023 14:43.
[03.03.2023] pzotov
Added substitution for suppressing 'Nullable' flags in the SQLDA output: it is sufficient for this test
to check only datatypes of result.
Discussed with Vlad, letters 02-mar-2023 16:01 and 03-mar-2023 14:43.
Checked on 5.0.0.967, 4.0.3.2904 (intermediate build 03-mar-2023 12:33)
Checked on 5.0.0.967, 4.0.3.2904 (intermediate build 03-mar-2023 12:33)
[14.12.2023] pzotov
Added 'SQLSTATE' in substitutions: runtime error must not be filtered out by '?!(...)' pattern
("negative lookahead assertion", see https://docs.python.org/3/library/re.html#regular-expression-syntax).
Added 'combine_output = True' in order to see SQLSTATE if any error occurs.
"""
import pytest
@ -28,7 +32,7 @@ test_script = """
select blob_append(null, null) as blob_result from rdb$database;
"""
act = isql_act('db', test_script, substitutions = [('^((?!sqltype:|BLOB_RESULT).)*$', ''), ('BLOB Nullable', 'BLOB'), ('[ \t]+', ' ')])
act = isql_act('db', test_script, substitutions = [('^((?!SQLSTATE|sqltype:|BLOB_RESULT).)*$', ''), ('BLOB Nullable', 'BLOB'), ('[ \t]+', ' ')])
expected_stdout = """
01: sqltype: 520 BLOB Nullable scale: 0 subtype: 0 len: 8
@ -39,5 +43,5 @@ expected_stdout = """
@pytest.mark.version('>=4.0.3')
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.execute()
act.execute(combine_output = True)
assert act.clean_stdout == act.clean_expected_stdout