diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-07-17 11:09:29 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-07-17 11:09:29 -0400 |
commit | c8f38dff1143585226cd79865a6144d16ee0ba18 (patch) | |
tree | 9c206d45408b59753c44558fc14d5e6980e84962 | |
parent | 480dad983c39cef2ecf882958211929cf12c3994 (diff) | |
download | sqlalchemy-c8f38dff1143585226cd79865a6144d16ee0ba18.tar.gz |
- db_opts doesn't need to be a global since we no longer have any global
option for it. keep it local to production of config so values don't
leak in a multi --db situation.
-rw-r--r-- | lib/sqlalchemy/testing/plugin/plugin_base.py | 7 | ||||
-rw-r--r-- | lib/sqlalchemy/testing/provision.py | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index ef304afa6..6cdec05ad 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -40,7 +40,6 @@ file_config = None logging = None -db_opts = {} include_tags = set() exclude_tags = set() options = None @@ -115,7 +114,6 @@ def memoize_important_follower_config(dict_): """ dict_['memoized_config'] = { - 'db_opts': db_opts, 'include_tags': include_tags, 'exclude_tags': exclude_tags } @@ -127,8 +125,7 @@ def restore_important_follower_config(dict_): This invokes in the follower process. """ - global db_opts, include_tags, exclude_tags - db_opts.update(dict_['memoized_config']['db_opts']) + global include_tags, exclude_tags include_tags.update(dict_['memoized_config']['include_tags']) exclude_tags.update(dict_['memoized_config']['exclude_tags']) @@ -268,7 +265,7 @@ def _engine_uri(options, file_config): for db_url in db_urls: cfg = provision.setup_config( - db_url, db_opts, options, file_config, provision.FOLLOWER_IDENT) + db_url, options, file_config, provision.FOLLOWER_IDENT) if not config._current: cfg.set_as_current(cfg, testing) diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py index 8469a0658..77527571b 100644 --- a/lib/sqlalchemy/testing/provision.py +++ b/lib/sqlalchemy/testing/provision.py @@ -46,9 +46,10 @@ def configure_follower(follower_ident): _configure_follower(cfg, follower_ident) -def setup_config(db_url, db_opts, options, file_config, follower_ident): +def setup_config(db_url, options, file_config, follower_ident): if follower_ident: db_url = _follower_url_from_main(db_url, follower_ident) + db_opts = {} _update_db_opts(db_url, db_opts) eng = engines.testing_engine(db_url, db_opts) eng.connect().close() |