diff options
author | Diana Clarke <diana.joan.clarke@gmail.com> | 2012-11-19 23:29:08 -0500 |
---|---|---|
committer | Diana Clarke <diana.joan.clarke@gmail.com> | 2012-11-19 23:29:08 -0500 |
commit | 014e9128546a0c32cdd90ad5ccdcc21269987ee0 (patch) | |
tree | 915a9c89a5d3cd5d914867b3ab628c5f6f33bd8b /lib/sqlalchemy/testing/plugin/noseplugin.py | |
parent | e0dc5ed803de7a57de033c16f2fa0044b59ce374 (diff) | |
download | sqlalchemy-014e9128546a0c32cdd90ad5ccdcc21269987ee0.tar.gz |
juts a 'expected 2 blank lines' pep8 pass
Diffstat (limited to 'lib/sqlalchemy/testing/plugin/noseplugin.py')
-rw-r--r-- | lib/sqlalchemy/testing/plugin/noseplugin.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/plugin/noseplugin.py b/lib/sqlalchemy/testing/plugin/noseplugin.py index 37f7b29f5..c104c4614 100644 --- a/lib/sqlalchemy/testing/plugin/noseplugin.py +++ b/lib/sqlalchemy/testing/plugin/noseplugin.py @@ -41,6 +41,7 @@ db_opts = {} options = None _existing_engine = None + def _log(option, opt_str, value, parser): global logging if not logging: @@ -59,34 +60,42 @@ def _list_dbs(*args): print "%20s\t%s" % (macro, file_config.get('db', macro)) sys.exit(0) + def _server_side_cursors(options, opt_str, value, parser): db_opts['server_side_cursors'] = True + def _engine_strategy(options, opt_str, value, parser): if value: db_opts['strategy'] = value pre_configure = [] post_configure = [] + + def pre(fn): pre_configure.append(fn) return fn + + def post(fn): post_configure.append(fn) return fn + @pre def _setup_options(opt, file_config): global options options = opt + @pre def _monkeypatch_cdecimal(options, file_config): if options.cdecimal: - import sys import cdecimal sys.modules['decimal'] = cdecimal + @post def _engine_uri(options, file_config): global db_label, db_url @@ -105,6 +114,7 @@ def _engine_uri(options, file_config): % db_label) db_url = file_config.get('db', db_label) + @post def _require(options, file_config): if not(options.require or @@ -131,12 +141,14 @@ def _require(options, file_config): continue pkg_resources.require(requirement) + @post def _engine_pool(options, file_config): if options.mockpool: from sqlalchemy import pool db_opts['poolclass'] = pool.AssertionPool + @post def _create_testing_engine(options, file_config): from sqlalchemy.testing import engines, config @@ -199,6 +211,7 @@ def _set_table_options(options, file_config): if options.mysql_engine: table_options['mysql_engine'] = options.mysql_engine + @post def _reverse_topological(options, file_config): if options.reversetop: @@ -208,6 +221,7 @@ def _reverse_topological(options, file_config): topological.set = unitofwork.set = session.set = mapper.set = \ dependency.set = RandomSet + @post def _requirements(options, file_config): from sqlalchemy.testing import config @@ -230,6 +244,7 @@ def _post_setup_options(opt, file_config): from sqlalchemy.testing import config config.options = options + @post def _setup_profiling(options, file_config): from sqlalchemy.testing import profiling |