From 3cf0a1642eafe53e3c3b40b06cf105a32676a27f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 11 Nov 2019 14:57:08 -0500 Subject: Test fixture improvements - ensure we escape out percent signs when a CompiledSQL or RegexSQL has percent signs in the SQL or in the parameter repr - to support combinations, print out complete test name in skip messages, py.test environment gives us a way to do this Change-Id: Ia9e62f7c1026c1465986144c5757e35fc164a2b8 --- lib/sqlalchemy/testing/plugin/pytestplugin.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/sqlalchemy/testing/plugin/pytestplugin.py') diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py index 2f7df97fa..44fccf28d 100644 --- a/lib/sqlalchemy/testing/plugin/pytestplugin.py +++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py @@ -412,3 +412,6 @@ class PytestFixtureFunctions(plugin_base.FixtureFunctions): def fixture(self, *arg, **kw): return pytest.fixture(*arg, **kw) + + def get_current_test_name(self): + return os.environ.get("PYTEST_CURRENT_TEST") -- cgit v1.2.1