#coding:utf-8 """ ID: issue-4389 ISSUE: 4389 TITLE: isql does not insert boolean values correctly, always shown as False DESCRIPTION: JIRA: CORE-4061 FBTEST: bugs.core_4061 """ import pytest from firebird.qa import * db = db_factory() test_script = """ create table x( id smallint generated by default as identity, a varchar(10), b boolean, c boolean, primary key(id) ); commit; insert into x(a,b,c) values ('f1',true, false); insert into x(a,b,c) values ('f2',1=1, null is null); insert into x(a,b,c) values ('f3', null is not null, null = null); insert into x(a,b,c) values ('f4', null is not distinct from null, null and null and not null); insert into x(a,b,c) values ('f5', true is not distinct from not false, not false is not distinct from not not true ); set list on; select * from x; """ act = isql_act('db', test_script) expected_stdout = """ ID 1 A f1 B C ID 2 A f2 B C ID 3 A f3 B C ID 4 A f4 B C ID 5 A f5 B C """ @pytest.mark.version('>=3.0') def test_1(act: Action): act.expected_stdout = expected_stdout act.execute() assert act.clean_stdout == act.clean_expected_stdout