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

Added/Updated tests\bugs\core_6262_test.py: added code for easier diagnostics when fail occurs

This commit is contained in:
pavel-zotov 2023-12-12 11:40:05 +03:00
parent 2c6ff0472e
commit 6c03c0416f

View File

@ -55,15 +55,21 @@ def test_1(act: Action, capsys):
act.isql(switches=[], input='\n'.join(chk_script))
# Checks
lines_with_charset = lines_without_charset = 0
names_without_charset = []
for line in act.clean_stdout.splitlines():
if line.split():
if 'CHARACTER SET' in line:
lines_with_charset += 1
else:
lines_without_charset += 1
names_without_charset.append(line,)
if lines_with_charset > 0:
result = 'SAME AS' if lines_with_charset == text_domains_count else f'{lines_with_charset} - LESS THAN'
print(f'Number of lines with specified charset: {result} NUMBER OF TEXT DOMAINS')
if lines_without_charset:
print(f'Number of text domains: {text_domains_count}')
print(f'Number of lines WITHOUT specified charset: {lines_without_charset}')
print('\n'.join(names_without_charset))
else:
print('SOMETHING WAS WRONG: COULD NOT FIND ANY LINE WITH "CHARACTER SET" PHRASE')
print('Number of lines with missed charset:', lines_without_charset)