Skip to content

Commit 07e25d0

Browse files
MNT: Fix CI warnings
ResourceWarning: unclosed file <_io.BufferedReader name='/home/runner/work/nibabel/nibabel/virtenv/lib/python3.9/site-packages/nibabel/tests/data/tinypet.v'>
1 parent 8cf190d commit 07e25d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nibabel/tests/test_ecat.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_dtype(self):
5757
hdr.get_data_dtype()
5858

5959
def test_header_codes(self):
60-
fid = open(ecat_file, 'rb')
60+
fid = open(self.example_file, 'rb')
6161
hdr = self.header_class()
6262
newhdr = hdr.from_fileobj(fid)
6363
fid.close()
@@ -118,6 +118,7 @@ def test_mlist_errors(self):
118118
hdr = self.header_class.from_fileobj(fid)
119119
hdr['num_frames'] = 6
120120
mlist = read_mlist(fid, hdr.endianness)
121+
fid.close()
121122
mlist = np.array([[1.68427540e+07, 3.00000000e+00,
122123
1.20350000e+04, 1.00000000e+00],
123124
[1.68427530e+07, 1.20360000e+04,

0 commit comments

Comments
 (0)