6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 21:43:06 +01:00

Added/Updated tests\bugs\gh_7642_test.py: Checked on 5.0.0.1087: all OK.

This commit is contained in:
pavel-zotov 2023-06-26 22:57:55 +03:00
parent e0f194f67c
commit 4cc1039736

View 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