summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/plugin/pytestplugin.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-03-26 20:43:20 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-03-26 20:43:20 -0400
commitb6411ee3cfe63d461b73e9aa8e69c6c550ddb649 (patch)
tree31383e4e82be67b833cae67399361a780927b82a /lib/sqlalchemy/testing/plugin/pytestplugin.py
parentbd86942b058681fbe87f7315dc9fa69642159506 (diff)
downloadsqlalchemy-b6411ee3cfe63d461b73e9aa8e69c6c550ddb649.tar.gz
fixes to get profiling tests working again
Diffstat (limited to 'lib/sqlalchemy/testing/plugin/pytestplugin.py')
-rw-r--r--lib/sqlalchemy/testing/plugin/pytestplugin.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py
index ceb6963ed..f38c7ea6a 100644
--- a/lib/sqlalchemy/testing/plugin/pytestplugin.py
+++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py
@@ -114,7 +114,13 @@ def pytest_runtest_teardown(item):
def test_setup(item):
# like a nose id, e.g.:
# "test.aaa_profiling.test_compiler.CompileTest.test_update_whereclause"
- id_ = "%s.%s.%s" % (item.parent.module.__name__, item.parent.cls.__name__, item.name)
+ name = item.parent.cls.__name__
+
+ suffix = "_%s_%s" % (plugin_base.config.db.name, plugin_base.config.db.driver)
+ if name.endswith(suffix):
+ name = name[0:-(len(suffix))]
+
+ id_ = "%s.%s.%s" % (item.parent.module.__name__, name, item.name)
plugin_base.before_test(item, id_)
def test_teardown(item):