We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9bbe82 commit 19b55b9Copy full SHA for 19b55b9
nibabel/tests/test_deprecator.py
@@ -144,11 +144,10 @@ class TestDeprecatorMaker(object):
144
def test_deprecator_maker(self):
145
dec = self.dep_maker(warn_class=UserWarning)
146
func = dec('foo')(func_no_doc)
147
- with clear_and_catch_warnings(modules=[_OWN_MODULE]) as w:
148
- warnings.simplefilter('always')
+ with pytest.warns(UserWarning) as w:
+ # warnings.simplefilter('always')
149
assert func() is None
150
assert len(w) == 1
151
- assert w[0].category is UserWarning
152
153
dec = self.dep_maker(error_class=CustomError)
154
0 commit comments