mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Added/Updated tests\bugs\gh_7642_test.py: Checked on 5.0.0.1087: all OK.
This commit is contained in:
parent
e0f194f67c
commit
4cc1039736
37
tests/bugs/gh_7642_test.py
Normal file
37
tests/bugs/gh_7642_test.py
Normal file
@ -0,0 +1,37 @@
|
||||
#coding:utf-8
|
||||
|
||||
"""
|
||||
ID: issue-7642
|
||||
ISSUE: https://github.com/FirebirdSQL/firebird/issues/7642
|
||||
TITLE: Getting the current DECFLOAT ROUND/TRAPS settings
|
||||
DESCRIPTION:
|
||||
NOTES:
|
||||
Checked on 5.0.0.1087: all OK.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from firebird.qa import *
|
||||
|
||||
db = db_factory()
|
||||
|
||||
test_script = f"""
|
||||
set list on;
|
||||
select
|
||||
rdb$get_context('SYSTEM', 'DECFLOAT_ROUND') as current_decfloat_round
|
||||
,rdb$get_context('SYSTEM', 'DECFLOAT_TRAPS') as current_decfloat_traps
|
||||
from rdb$database;
|
||||
"""
|
||||
|
||||
act = isql_act('db', test_script)
|
||||
|
||||
expected_stdout = """
|
||||
CURRENT_DECFLOAT_ROUND HALF_UP
|
||||
CURRENT_DECFLOAT_TRAPS Division_by_zero,Invalid_operation,Overflow
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=5.0')
|
||||
def test_1(act: Action):
|
||||
|
||||
act.expected_stdout = expected_stdout
|
||||
act.execute(combine_output = True)
|
||||
assert act.clean_stdout == act.clean_expected_stdout
|
Loading…
Reference in New Issue
Block a user