6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-02-02 02:40:42 +01:00

Added/Updated tests\bugs\gh_7604_test.py: moved DDL with non-ascii text into 'init_sql' to be executed on initial phase, otherwise get exception UnicodeEncodeError: 'charmap' codec can not encode characters in position 208-211: character maps to [undefined].

This commit is contained in:
pavel-zotov 2023-06-04 10:22:26 +03:00
parent 80521671ee
commit 305dc3318c

View File

@ -13,14 +13,7 @@ import locale
import pytest
from firebird.qa import *
db = db_factory(charset = 'utf8')
act = python_act('db', substitutions=[('^((?!sqltype:).)*$',''),('[ \t]+',' '),('.*alias:.*','')])
@pytest.mark.version('>=4.0.3')
def test_1(act: Action):
test_sql = """
init_sql = """
set term ^;
create or alter function sp_test_func returns blob sub_type text character set utf8 as
declare runtotal blob sub_type text;
@ -31,6 +24,15 @@ def test_1(act: Action):
^
set term ;^
commit;
"""
db = db_factory(charset = 'utf8', init = init_sql)
act = python_act('db', substitutions=[('^((?!sqltype:).)*$',''),('[ \t]+',' '),('.*alias:.*','')])
@pytest.mark.version('>=4.0.3')
def test_1(act: Action):
test_sql = """
set list on;
set sqlda_display on;
select sp_test_func() as runtotal from rdb$database rows 0;