diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-27 13:17:20 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-27 13:17:20 -0400 |
commit | e3a1a2d01c83e9451527b0c5ac316d9a510ac5bc (patch) | |
tree | f12ebc229eaa2397c2f80ff555c8941a556c50c1 /lib/sqlalchemy/testing/plugin/plugin_base.py | |
parent | b6411ee3cfe63d461b73e9aa8e69c6c550ddb649 (diff) | |
download | sqlalchemy-e3a1a2d01c83e9451527b0c5ac316d9a510ac5bc.tar.gz |
- fixes to multi-backend tests
- move the logic to determine "test id" into plugin_base
- update callcounts
Diffstat (limited to 'lib/sqlalchemy/testing/plugin/plugin_base.py')
-rw-r--r-- | lib/sqlalchemy/testing/plugin/plugin_base.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index e9e52827b..061848e27 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -324,7 +324,7 @@ def generate_sub_tests(cls, module): name, (cls, ), { - "__only_on__": (cfg.db.name, cfg.db.driver), + "__only_on__": ("%s+%s" % (cfg.db.name, cfg.db.driver)), "__backend__": False} ) setattr(module, name, subcls) @@ -351,7 +351,18 @@ def _setup_engine(cls): eng = engines.testing_engine(options=cls.__engine_options__) config._current.push_engine(eng, testing) -def before_test(test, id_): +def before_test(test, test_module_name, test_class, test_name): + + # like a nose id, e.g.: + # "test.aaa_profiling.test_compiler.CompileTest.test_update_whereclause" + name = test_class.__name__ + + suffix = "_%s_%s" % (config.db.name, config.db.driver) + if name.endswith(suffix): + name = name[0:-(len(suffix))] + + id_ = "%s.%s.%s" % (test_module_name, name, test_name) + warnings.resetwarnings() profiling._current_test = id_ |