mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +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:
parent
80521671ee
commit
305dc3318c
@ -13,7 +13,19 @@ import locale
|
||||
import pytest
|
||||
from firebird.qa import *
|
||||
|
||||
db = db_factory(charset = 'utf8')
|
||||
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;
|
||||
begin
|
||||
runtotal = 'мама мыла раму';
|
||||
return runtotal;
|
||||
end
|
||||
^
|
||||
set term ;^
|
||||
commit;
|
||||
"""
|
||||
db = db_factory(charset = 'utf8', init = init_sql)
|
||||
|
||||
act = python_act('db', substitutions=[('^((?!sqltype:).)*$',''),('[ \t]+',' '),('.*alias:.*','')])
|
||||
|
||||
@ -21,16 +33,6 @@ act = python_act('db', substitutions=[('^((?!sqltype:).)*$',''),('[ \t]+',' '),(
|
||||
def test_1(act: Action):
|
||||
|
||||
test_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;
|
||||
begin
|
||||
runtotal = 'мама мыла раму';
|
||||
return runtotal;
|
||||
end
|
||||
^
|
||||
set term ;^
|
||||
commit;
|
||||
set list on;
|
||||
set sqlda_display on;
|
||||
select sp_test_func() as runtotal from rdb$database rows 0;
|
||||
|
Loading…
Reference in New Issue
Block a user