diff options
author | Federico Caselli <cfederico87@gmail.com> | 2022-07-14 17:19:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2022-07-14 17:19:43 +0000 |
commit | 54d5953be781b1d213557940c6f5960a8d1068dc (patch) | |
tree | 5c5386ec50d3e5c398589c4d40c178786c8f15e9 /tests | |
parent | 70cc5ab99300217dfab5439ae911fc7301fa63fa (diff) | |
parent | ba8e22b2e29abcbfeac8a25e289191da0e7217c3 (diff) | |
download | alembic-54d5953be781b1d213557940c6f5960a8d1068dc.tar.gz |
Merge "Ignore reflected expression based indexes" into main
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_postgresql.py | 13 |
1 files changed, 5 insertions, 8 deletions
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, []) |