diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-07-26 20:50:57 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-07-26 20:50:57 -0400 |
commit | d2358629c9ea7f12718f32b64c7de7f2030dcd32 (patch) | |
tree | 1933ad41f00c94c00b9590e72f275e94e04f69ce /lib/sqlalchemy/testing/plugin/plugin_base.py | |
parent | e65cb04974cc35e6f8301b9b7bc2a02d11edf139 (diff) | |
download | sqlalchemy-d2358629c9ea7f12718f32b64c7de7f2030dcd32.tar.gz |
- scale up for mysql, sqlite
Diffstat (limited to 'lib/sqlalchemy/testing/plugin/plugin_base.py')
-rw-r--r-- | lib/sqlalchemy/testing/plugin/plugin_base.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index f16a0828f..095e3f369 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -103,7 +103,7 @@ def setup_options(make_option): def configure_follower(follower_ident): global FOLLOWER_IDENT - FOLLOWER_IDENT = "test_%s" % follower_ident + FOLLOWER_IDENT = follower_ident def read_config(): @@ -221,18 +221,20 @@ def _engine_uri(options, file_config): if not db_urls: db_urls.append(file_config.get('db', 'default')) + from . import provision + for db_url in db_urls: - if FOLLOWER_IDENT: - from sqlalchemy.engine import url - db_url = url.make_url(db_url) - db_url.database = FOLLOWER_IDENT - eng = engines.testing_engine(db_url, db_opts) - eng.connect().close() - config.Config.register(eng, db_opts, options, file_config, testing) + cfg = provision.setup_config( + db_url, db_opts, options, file_config, FOLLOWER_IDENT) + + if not config._current: + cfg.set_as_current(cfg, testing) config.db_opts = db_opts + + @post def _engine_pool(options, file_config): if options.mockpool: |