diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-08-31 15:22:00 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-08-31 15:22:00 -0400 |
commit | 3c60d3b1ca492ba77d64111f0378892acaadf36b (patch) | |
tree | 5e2df552a7142cd3bb2ef9e5236db85e5c2859f4 /lib/sqlalchemy/testing/plugin/plugin_base.py | |
parent | 903b0a42e71c81ff99494352760c0f92fa7a486d (diff) | |
download | sqlalchemy-3c60d3b1ca492ba77d64111f0378892acaadf36b.tar.gz |
- A new style of warning can be emitted which will "filter" up to
N occurrences of a parameterized string. This allows parameterized
warnings that can refer to their arguments to be delivered a fixed
number of times until allowing Python warning filters to squelch them,
and prevents memory from growing unbounded within Python's
warning registries.
fixes #3178
Diffstat (limited to 'lib/sqlalchemy/testing/plugin/plugin_base.py')
-rw-r--r-- | lib/sqlalchemy/testing/plugin/plugin_base.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index c02f0556b..7ba31d3e3 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -181,7 +181,7 @@ def post_begin(): from sqlalchemy.testing import fixtures, engines, exclusions, \ assertions, warnings, profiling, config from sqlalchemy import util - + warnings.setup_filters() def _log(opt_str, value, parser): global logging @@ -491,13 +491,11 @@ def before_test(test, test_module_name, test_class, test_name): id_ = "%s.%s.%s" % (test_module_name, name, test_name) - warnings.resetwarnings() profiling._current_test = id_ def after_test(test): engines.testing_reaper._after_test_ctx() - warnings.resetwarnings() def _possible_configs_for_cls(cls, reasons=None): |