From ba8e22b2e29abcbfeac8a25e289191da0e7217c3 Mon Sep 17 00:00:00 2001 From: CaselIT Date: Mon, 4 Jul 2022 22:47:20 +0200 Subject: Ignore reflected expression based indexes this establishes forwads-compatibility for PostgreSQL expression-based index reflection being added in I3e36d557235286c0f7f6d8276272ff9225058d48 Change-Id: I81d7832f254f50dc3417dd3437c2b49ec3a549e2 --- tests/test_postgresql.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py index 9246575..b9be5cb 100644 --- a/tests/test_postgresql.py +++ b/tests/test_postgresql.py @@ -1308,6 +1308,9 @@ class PGUniqueIndexAutogenerateTest(AutogenFixtureTest, TestBase): eq_(diffs[0][1].name, "uq_name") eq_(len(diffs), 1) + def _functional_index_warn(self): + return (r"Skip.*refl",) + def test_functional_ix_one(self): m1 = MetaData() m2 = MetaData() @@ -1328,10 +1331,7 @@ class PGUniqueIndexAutogenerateTest(AutogenFixtureTest, TestBase): ) Index("email_idx", func.lower(t2.c.email), unique=True) - with assertions.expect_warnings( - "Skipped unsupported reflection", - "autogenerate skipping functional index", - ): + with assertions.expect_warnings(*self._functional_index_warn()): diffs = self._fixture(m1, m2) eq_(diffs, []) @@ -1365,9 +1365,6 @@ class PGUniqueIndexAutogenerateTest(AutogenFixtureTest, TestBase): unique=True, ) - with assertions.expect_warnings( - "Skipped unsupported reflection", - "autogenerate skipping functional index", - ): + with assertions.expect_warnings(*self._functional_index_warn()): diffs = self._fixture(m1, m2) eq_(diffs, []) -- cgit v1.2.1