mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Reset warnings before testing warnings
This commit is contained in:
parent
a6e53abd34
commit
a48ae09ce9
@ -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',)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user