From cc16397b98a0450d05732dc8696eece5a42998af Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 4 Nov 2021 14:34:07 -0400 Subject: [PATCH] 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 --- docs/build/unreleased/test_changes.rst | 5 +++++ tests/test_script_consumption.py | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 docs/build/unreleased/test_changes.rst 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: -- 2.47.2