summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/plugin
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-06-21 15:23:52 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-06-21 15:23:52 -0400
commit6da5242953feffac7be29ecab256de372ffc1d31 (patch)
treec9d4395d0d86c55f335385ed3bab52cc5b939d09 /lib/sqlalchemy/testing/plugin
parent0ad64da3971bd4ac42699cf891fd689e7291cd2f (diff)
downloadsqlalchemy-6da5242953feffac7be29ecab256de372ffc1d31.tar.gz
Register pytest assertion rewriting on sqlalchemy.testing.assertions
Since our various eq_(), ne_() etc. functions use assert, pytest can rewrite this module using its enhanced string reporting. very helpful for comparing SQL strings Change-Id: Ia71328401fd7965bcb14eb1ccea0dc48a8f2c3ea
Diffstat (limited to 'lib/sqlalchemy/testing/plugin')
-rw-r--r--lib/sqlalchemy/testing/plugin/pytestplugin.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py
index e0335c135..7e144dd73 100644
--- a/lib/sqlalchemy/testing/plugin/pytestplugin.py
+++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py
@@ -72,6 +72,8 @@ def pytest_addoption(parser):
def pytest_configure(config):
+ pytest.register_assert_rewrite("sqlalchemy.testing.assertions")
+
if hasattr(config, "slaveinput"):
plugin_base.restore_important_follower_config(config.slaveinput)
plugin_base.configure_follower(config.slaveinput["follower_ident"])