From: Jeff Horemans Date: Thu, 8 Aug 2024 08:44:07 +0000 (+0200) Subject: Expanded SQLite check constrait reflection case with constraint name that includes... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84b75c70ba2e0ae6f5fd7c9162cf04caec84e94f;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Expanded SQLite check constrait reflection case with constraint name that includes tabs and newlines. --- diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py index 98de6e3560..a479b63ad3 100644 --- a/test/dialect/test_sqlite.py +++ b/test/dialect/test_sqlite.py @@ -1821,8 +1821,8 @@ class ConstraintReflectionTest(fixtures.TestBase): CheckConstraint("id > 0"), # Constraint definition with newline and tab characters CheckConstraint("((value > 0) AND \n\t(value < 100) AND \n\t(value != 50))", name='ck_r_value_multiline'), - # Constraint name with special characters and spaces. - CheckConstraint("value IS NOT NULL", name='^ck-r* # Value'), + # Constraint name with special characters. + CheckConstraint("value IS NOT NULL", name="^ck-r* #\n\t"), # Constraint definition with special characters. CheckConstraint("prefix NOT GLOB '*[^-. /#,]*'") ) @@ -2471,7 +2471,7 @@ class ConstraintReflectionTest(fixtures.TestBase): eq_( inspector.get_check_constraints("r"), [ - {"sqltext": "value IS NOT NULL", "name": "^ck-r* # Value"}, + {"sqltext": "value IS NOT NULL", "name": "^ck-r* #\n\t"}, {"sqltext": "((value > 0) AND \n\t(value < 100) AND \n\t(value != 50))", "name": "ck_r_value_multiline"}, {"sqltext": "id > 0", "name": None}, {"sqltext": "prefix NOT GLOB '*[^-. /#,]*'", "name": None},