From: Mike Bayer Date: Tue, 24 Mar 2020 17:15:59 +0000 (-0400) Subject: Ensure default_schema_name set to None in "schema is none" test X-Git-Tag: rel_1_4_3~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d89c8e5d45c8884810a299b3be950d0f0505920;p=thirdparty%2Fsqlalchemy%2Falembic.git Ensure default_schema_name set to None in "schema is none" test A test here is working with the assumption that the default schema name for the SQLite dialect is None. This assumption is likely changing in SQLAlchemy 1.4 due to Ia5c89eb27cc8dc2c5b8e76d6c07c46290a7901b6, so for this test case explicitly set it to None. Change-Id: I8b6427d9f975d489f33f51484e45b0bdc81acf70 --- diff --git a/tests/test_autogen_diffs.py b/tests/test_autogen_diffs.py index ad387655..4ef76969 100644 --- a/tests/test_autogen_diffs.py +++ b/tests/test_autogen_diffs.py @@ -208,6 +208,10 @@ class AutogenDefaultSchemaIsNoneTest(AutogenFixtureTest, TestBase): def setUp(self): super(AutogenDefaultSchemaIsNoneTest, self).setUp() + # in SQLAlchemy 1.4, SQLite dialect is setting this name + # to "main" as is the actual default schema name for SQLite. + self.bind.dialect.default_schema_name = None + # prerequisite eq_(self.bind.dialect.default_schema_name, None)