File tree Expand file tree Collapse file tree 1 file changed +9
-24
lines changed Expand file tree Collapse file tree 1 file changed +9
-24
lines changed Original file line number Diff line number Diff line change 7
7
#
8
8
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9
9
10
- import warnings
10
+ from ..giftiio import read , write
11
+ from .test_parse_gifti_fast import DATA_FILE1
11
12
12
- from nibabel .testing import clear_and_catch_warnings
13
- from nibabel .tmpdirs import InTemporaryDirectory
13
+ import pytest
14
14
15
15
16
- from .test_parse_gifti_fast import (DATA_FILE1 , DATA_FILE2 , DATA_FILE3 ,
17
- DATA_FILE4 , DATA_FILE5 , DATA_FILE6 )
18
-
19
-
20
- class TestGiftiIO (object ):
21
-
22
- def setUp (self ):
23
- with clear_and_catch_warnings () as w :
24
- warnings .simplefilter ('always' , DeprecationWarning )
25
- assert len (w ) == 1
26
-
27
-
28
- def test_read_deprecated ():
29
- with clear_and_catch_warnings () as w :
30
- warnings .simplefilter ('always' , DeprecationWarning )
31
- from nibabel .gifti .giftiio import read , write
32
-
16
+ def test_read_deprecated (tmp_path ):
17
+ with pytest .deprecated_call ():
33
18
img = read (DATA_FILE1 )
34
- assert len ( w ) == 1
35
- with InTemporaryDirectory ():
36
- write ( img , 'test.gii' )
37
- assert len ( w ) == 2
19
+
20
+ fname = tmp_path / 'test.gii'
21
+ with pytest . deprecated_call ():
22
+ write ( img , fname )
You can’t perform that action at this time.
0 commit comments