diff options
author | Brett Cannon <bcannon@gmail.com> | 2007-08-14 05:51:06 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2007-08-14 05:51:06 (GMT) |
commit | 2ee4128e9b4f481d5029fe4c8ada6c12ac64e2bd (patch) | |
tree | dcdfe00aac7f3bdbe594720cc8dac33541863c04 /Lib/test/test_support.py | |
parent | be7abbb9d9d886d83c6990f7c68e8e4f84b57c8d (diff) | |
download | cpython-2ee4128e9b4f481d5029fe4c8ada6c12ac64e2bd.zip cpython-2ee4128e9b4f481d5029fe4c8ada6c12ac64e2bd.tar.gz cpython-2ee4128e9b4f481d5029fe4c8ada6c12ac64e2bd.tar.bz2 |
Remove test.test_support.guard_warnings_filter.
test.test_support.catch_warning is more full-featured and provides the same
functionality.
Since guard_warnings_filter was added in 2.6 there is no
backwards-compatibility issues.
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r-- | Lib/test/test_support.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 52f74f5..0f96084 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -271,14 +271,6 @@ def open_urlresource(url): fn, _ = urllib.urlretrieve(url, filename) return open(fn) -@contextlib.contextmanager -def guard_warnings_filter(): - """Guard the warnings filter from being permanently changed.""" - original_filters = warnings.filters[:] - try: - yield - finally: - warnings.filters = original_filters class WarningMessage(object): "Holds the result of the latest showwarning() call" |