6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 21:43:06 +01:00

Added/Updated tests\bugs\core_2831_test.py: Added 'SQLSTATE' in substitutions: runtime error must not be filtered out by '?(...)' pattern. Added 'combine_output = True' in order to see SQLSTATE if any error occurs.

This commit is contained in:
pavel-zotov 2023-12-10 13:12:05 +03:00
parent ebfa3c3e37
commit 6cc907c2a4

View File

@ -2,11 +2,16 @@
""" """
ID: issue-3217 ID: issue-3217
ISSUE: 3217 ISSUE: https://github.com/FirebirdSQL/firebird/issues/3217
TITLE: isql shouldn't display db and user name when extracting a script TITLE: isql shouldn't display db and user name when extracting a script
DESCRIPTION: DESCRIPTION:
JIRA: CORE-2831 JIRA: CORE-2831
FBTEST: bugs.core_2831 FBTEST: bugs.core_2831
NOTES:
[10.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 import pytest
@ -14,10 +19,10 @@ from firebird.qa import *
db = db_factory() db = db_factory()
act = python_act('db', substitutions=[('^((?!Database:|User:).)*$', '')]) act = python_act('db', substitutions=[('^((?!(SQLSTATE|Database:|User:)).)*$', '')])
@pytest.mark.version('>=3.0') @pytest.mark.version('>=3.0')
def test_1(act: Action): def test_1(act: Action):
act.isql(switches=['-x']) act.expected_stdout = ""
act.isql(switches=['-x'], combine_output = True)
assert act.clean_stdout == act.clean_expected_stdout assert act.clean_stdout == act.clean_expected_stdout