Skip to content

Commit 786cf99

Browse files
committed
TEST: Small cleanups
1 parent 963aee4 commit 786cf99

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

nibabel/streamlines/tests/test_streamlines.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,12 @@ def test_save_tractogram_file(self):
201201
nib.streamlines.save(trk_file, "dummy.trk", header={})
202202

203203
# Wrong extension.
204-
with pytest.warns(None) as w:
204+
with pytest.warns(ExtensionWarning) as w:
205205
trk_file = trk.TrkFile(tractogram)
206206
with self.assertRaises(ValueError):
207207
nib.streamlines.save(trk_file, "dummy.tck", header={})
208208

209209
assert len(w) == 1
210-
assert issubclass(w[0].category, ExtensionWarning)
211210
assert "extension" in str(w[0].message)
212211

213212
with InTemporaryDirectory():

nibabel/tests/test_image_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959

6060
def maybe_deprecated(meth_name):
61-
return pytest.deprecated_call() if meth_name =='get_data' else nullcontext()
61+
return pytest.deprecated_call() if meth_name == 'get_data' else nullcontext()
6262

6363

6464
class GenericImageAPI(ValidateAPI):

0 commit comments

Comments
 (0)