Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoided leaking warning filters.

  • Loading branch information...
commit 06615d0d6e75b537291ea6be74a973a8b6160211 1 parent 84c1374
@aaugustin aaugustin authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 tests/deprecation/tests.py
View
6 tests/deprecation/tests.py
@@ -193,9 +193,8 @@ def test_deprecated_request(self):
@override_settings(USE_I18N=True)
class DeprecatedChineseLanguageCodes(SimpleTestCase):
def test_deprecation_warning(self):
- warnings.simplefilter('always')
-
with warnings.catch_warnings(record=True) as recorded:
+ warnings.simplefilter('always')
with translation.override('zh-cn'):
pass
with translation.override('zh-tw'):
@@ -214,9 +213,8 @@ def test_deprecated_memoize(self):
"""
Ensure the correct warning is raised when memoize is used.
"""
- warnings.simplefilter('always')
-
with warnings.catch_warnings(record=True) as recorded:
+ warnings.simplefilter('always')
memoize(lambda x: x, {}, 1)
msg = str(recorded.pop().message)
self.assertEqual(msg,

1 comment on commit 06615d0

@claudep
Collaborator

Ahhhh... there they were :-)

Please sign in to comment.
Something went wrong with that request. Please try again.