From afc049b5cb10368c2dd2e627742081f08b08a87a Mon Sep 17 00:00:00 2001 From: pavel-zotov Date: Wed, 13 Dec 2023 14:00:42 +0300 Subject: [PATCH] Added/Updated tests\bugs\core_6049_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. --- tests/bugs/core_6049_test.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/bugs/core_6049_test.py b/tests/bugs/core_6049_test.py index 554c164b..2768f63f 100644 --- a/tests/bugs/core_6049_test.py +++ b/tests/bugs/core_6049_test.py @@ -20,6 +20,11 @@ NOTES: ab6aced05723dc1b2e6bb96bfdaa86cb3090daf2 // 6.x (Log message: "correction metaData") Discussed with dimitr, letter 20.11.2023 17:38. + + [13.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 @@ -49,11 +54,9 @@ test_script = """ ,hex_decode(hex_encode(uid)) as "hex_decode(hex_encode(uid))" from test ) t; - - commit; """ -substitutions = [ ('^((?!(sqltype|alias|UID|encode|decode|result)).)*$', ''), ] +substitutions = [ ('^((?!(SQLSTATE|sqltype|alias|UID|encode|decode|result)).)*$', ''), ] act = isql_act('db', test_script, substitutions = substitutions) @@ -88,5 +91,5 @@ expected_stdout = f""" @pytest.mark.version('>=4.0') 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