From: Mike Bayer Date: Thu, 4 Nov 2021 18:34:07 +0000 (-0400) Subject: dont hardcode transaction opened messaging X-Git-Tag: rel_1_7_5~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc16397b98a0450d05732dc8696eece5a42998af;p=thirdparty%2Fsqlalchemy%2Falembic.git dont hardcode transaction opened messaging Adjustments to the test suite to accommodate for error message changes occurring as of SQLAlchemy 1.4.27. Change-Id: I5092c8d3ba3d16819b200f1dfc3c30b8d24abe30 --- diff --git a/docs/build/unreleased/test_changes.rst b/docs/build/unreleased/test_changes.rst new file mode 100644 index 00000000..00d48c56 --- /dev/null +++ b/docs/build/unreleased/test_changes.rst @@ -0,0 +1,5 @@ +.. change:: + :tags: bug, tests + + Adjustments to the test suite to accommodate for error message changes + occurring as of SQLAlchemy 1.4.27. diff --git a/tests/test_script_consumption.py b/tests/test_script_consumption.py index 4b46564d..33e40dc1 100644 --- a/tests/test_script_consumption.py +++ b/tests/test_script_consumption.py @@ -532,7 +532,7 @@ def downgrade(): if self.is_sqlalchemy_future: with testing.expect_raises_message( sa.exc.InvalidRequestError, - r"a transaction is already begun for this connection", + r".*already", ): command.upgrade(self.cfg, c) else: @@ -554,7 +554,7 @@ def downgrade(): if self.is_sqlalchemy_future: with testing.expect_raises_message( sa.exc.InvalidRequestError, - r"a transaction is already begun for this connection", + r".*already", ): command.upgrade(self.cfg, c) else: @@ -576,7 +576,7 @@ def downgrade(): if self.is_sqlalchemy_future: with testing.expect_raises_message( sa.exc.InvalidRequestError, - r"a transaction is already begun for this connection", + r".*already", ): command.upgrade(self.cfg, c) else: