diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-26 20:43:20 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-26 20:43:20 -0400 |
commit | b6411ee3cfe63d461b73e9aa8e69c6c550ddb649 (patch) | |
tree | 31383e4e82be67b833cae67399361a780927b82a /lib/sqlalchemy/testing/plugin/pytestplugin.py | |
parent | bd86942b058681fbe87f7315dc9fa69642159506 (diff) | |
download | sqlalchemy-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.py | 8 |
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): |