File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
import wfdb
2
2
import numpy as np
3
3
import os
4
+ import shutil
4
5
5
6
6
7
class test_record ():
@@ -391,3 +392,20 @@ def tearDownClass(self):
391
392
for file in writefiles :
392
393
if os .path .isfile (file ):
393
394
os .remove (file )
395
+
396
+
397
+ class test_download ():
398
+ # Test that we can download records with no "dat" file
399
+ # Regression test for https://github.com/MIT-LCP/wfdb-python/issues/118
400
+ def test_dl_database_no_dat_file ():
401
+ wfdb .dl_database ('afdb' , './download-tests/' , ['00735' ])
402
+
403
+ # Test that we can download records that *do* have a "dat" file.
404
+ def test_dl_database_with_dat_file ():
405
+ wfdb .dl_database ('afdb' , './download-tests/' , ['04015' ])
406
+
407
+ # Cleanup written files
408
+ @classmethod
409
+ def tearDownClass (self ):
410
+ if os .path .isdir ('./download-tests/' ):
411
+ shutil .rmtree ('./download-tests/' )
You can’t perform that action at this time.
0 commit comments