diff options
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/plugin/pytestplugin.py | 8 | ||||
| -rw-r--r-- | lib/sqlalchemy/testing/profiling.py | 2 |
2 files changed, 8 insertions, 2 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): diff --git a/lib/sqlalchemy/testing/profiling.py b/lib/sqlalchemy/testing/profiling.py index 021218c34..2f92527e9 100644 --- a/lib/sqlalchemy/testing/profiling.py +++ b/lib/sqlalchemy/testing/profiling.py @@ -111,7 +111,7 @@ class ProfileStatsFile(object): # etc. self._write() - @util.memoized_property + @property def platform_key(self): dbapi_key = config.db.name + "_" + config.db.driver |
