From dfb94052675d39dba7ab443c49a2e7a3153bd89f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 6 Oct 2020 23:46:03 -0400 Subject: [PATCH] modernize requirements for boolean constraint test this test was not actually working correctly against mariadb and was "failing" (i.e. "passing") inappropriately for pymysql, mysqlclient. it also started "passing" (i.e. "failing") for mariadb as of 1.0.3. modernize reqs here including for mssql bit behavior. Change-Id: Ia88ee607ec8d59f6140a7e4a1174910382d53674 --- test/sql/test_types.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/sql/test_types.py b/test/sql/test_types.py index efa622b135..7cba3b4507 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -3160,15 +3160,11 @@ class BooleanTest( Column("unconstrained_value", Boolean()), ) - @testing.fails_on( - ["mysql", "mariadb"], - "The CHECK clause is parsed but ignored by all storage engines.", - ) - @testing.fails_on("mssql", "FIXME: MS-SQL 2005 doesn't honor CHECK ?!?") - @testing.skip_if(lambda: testing.db.dialect.supports_native_boolean) + @testing.requires.enforces_check_constraints + @testing.requires.non_native_boolean_unconstrained def test_constraint(self, connection): assert_raises( - (exc.IntegrityError, exc.ProgrammingError), + (exc.IntegrityError, exc.ProgrammingError, exc.OperationalError), connection.exec_driver_sql, "insert into boolean_table (id, value) values(1, 5)", ) -- 2.39.5