From a48ae09ce927622e8a5931dbcb843523d8f4bd23 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Mon, 4 Apr 2016 12:19:59 +1000 Subject: [PATCH] Reset warnings before testing warnings --- wagtail/tests/test_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wagtail/tests/test_utils.py b/wagtail/tests/test_utils.py index 46838427cd..35a65d4518 100644 --- a/wagtail/tests/test_utils.py +++ b/wagtail/tests/test_utils.py @@ -11,6 +11,8 @@ from wagtail.utils.deprecation import RemovedInWagtail17Warning, SearchFieldsSho class TestThisShouldBeAList(SimpleTestCase): def test_add_a_list(self): with warnings.catch_warnings(record=True) as w: + warnings.simplefilter('always') + base = SearchFieldsShouldBeAList(['hello']) result = base + ['world'] @@ -23,6 +25,8 @@ class TestThisShouldBeAList(SimpleTestCase): def test_add_a_tuple(self): with warnings.catch_warnings(record=True) as w: + warnings.simplefilter('always') + base = SearchFieldsShouldBeAList(['hello']) result = base + ('world',)