6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 21:43:06 +01:00
firebird-qa/tests/bugs/core_1142_test.py
2024-12-30 13:53:06 -03:00

43 lines
879 B
Python

#coding:utf-8
"""
ID: issue-1564
ISSUE: 1564
TITLE: Cannot alter generator's comment to the same value
DESCRIPTION:
JIRA: CORE-1142
FBTEST: bugs.core_1142
"""
import pytest
from firebird.qa import *
init_script = """create generator T;"""
db = db_factory(init=init_script)
test_script = """comment on generator T is 'comment';
commit;
show comments;
comment on generator T is 'comment';
commit;
show comments;
comment on generator T is 'different comment';
commit;
show comments;
"""
act = isql_act('db', test_script)
expected_stdout = """COMMENT ON GENERATOR T IS comment;
COMMENT ON GENERATOR T IS comment;
COMMENT ON GENERATOR T IS different comment;
"""
@pytest.mark.version('>=3')
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout