File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ def test_1(self):
3333 # no null to detect in the output text file of rdann.
3434
3535 # Target data from WFDB software package
36- lines = tuple (open ("tests/target-output/ann-1" , "r" ))
36+ with open ("tests/target-output/ann-1" , "r" ) as f :
37+ lines = tuple (f )
3738 nannot = len (lines )
3839
3940 target_time = [None ] * nannot
@@ -108,7 +109,8 @@ def test_2(self):
108109 annotation = wfdb .rdann ("sample-data/12726" , "anI" )
109110
110111 # Target data from WFDB software package
111- lines = tuple (open ("tests/target-output/ann-2" , "r" ))
112+ with open ("tests/target-output/ann-2" , "r" ) as f :
113+ lines = tuple (f )
112114 nannot = len (lines )
113115
114116 target_time = [None ] * nannot
@@ -181,7 +183,8 @@ def test_3(self):
181183 annotation = wfdb .rdann ("sample-data/1003" , "atr" )
182184
183185 # Target data from WFDB software package
184- lines = tuple (open ("tests/target-output/ann-3" , "r" ))
186+ with open ("tests/target-output/ann-3" , "r" ) as f :
187+ lines = tuple (f )
185188 nannot = len (lines )
186189
187190 target_time = [None ] * nannot
You can’t perform that action at this time.
0 commit comments