Skip to content

Commit 19b55b9

Browse files
committed
small edit
1 parent a9bbe82 commit 19b55b9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nibabel/tests/test_deprecator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,10 @@ class TestDeprecatorMaker(object):
144144
def test_deprecator_maker(self):
145145
dec = self.dep_maker(warn_class=UserWarning)
146146
func = dec('foo')(func_no_doc)
147-
with clear_and_catch_warnings(modules=[_OWN_MODULE]) as w:
148-
warnings.simplefilter('always')
147+
with pytest.warns(UserWarning) as w:
148+
# warnings.simplefilter('always')
149149
assert func() is None
150150
assert len(w) == 1
151-
assert w[0].category is UserWarning
152151

153152
dec = self.dep_maker(error_class=CustomError)
154153
func = dec('foo')(func_no_doc)

0 commit comments

Comments
 (0)