Skip to content

Commit ffbf556

Browse files
committed
add datetime support for records. Fixes MIT-LCP#117
1 parent 63c987f commit ffbf556

File tree

5 files changed

+246
-131
lines changed

5 files changed

+246
-131
lines changed

tests/test_annotation.py

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1-
import numpy as np
21
import re
2+
3+
import numpy as np
4+
35
import wfdb
46

57
class test_annotation():
8+
"""
9+
Testing read and write of wfdb annotations, including Physionet
10+
streaming.
611
7-
# Test 1 - Annotation file 100.atr
8-
# Target file created with: rdann -r sample-data/100 -a atr > ann-1
9-
def test_1(self):
12+
Target files created using the original WFDB Software Package
13+
version 10.5.24
14+
"""
1015

11-
# Read data using WFDB python package
16+
def test_1(self):
17+
"""
18+
Target file created with:
19+
rdann -r sample-data/100 -a atr > ann-1
20+
"""
1221
annotation = wfdb.rdann('sample-data/100', 'atr')
1322

1423

@@ -66,11 +75,13 @@ def test_1(self):
6675
assert annotation.__eq__(pbannotation)
6776
assert annotation.__eq__(writeannotation)
6877

69-
# Test 2 - Annotation file 12726.anI with many aux_note strings.
70-
# Target file created with: rdann -r sample-data/100 -a atr > ann-2
7178
def test_2(self):
79+
"""
80+
Annotation file with many aux_note strings.
7281
73-
# Read data from WFDB python package
82+
Target file created with:
83+
rdann -r sample-data/100 -a atr > ann-2
84+
"""
7485
annotation = wfdb.rdann('sample-data/12726', 'anI')
7586

7687
# Target data from WFDB software package
@@ -118,11 +129,13 @@ def test_2(self):
118129
assert annotation.__eq__(pbannotation)
119130
assert annotation.__eq__(writeannotation)
120131

121-
# Test 3 - Annotation file 1003.atr with custom annotation types
122-
# Target file created with: rdann -r sample-data/1003 -a atr > ann-3
123132
def test_3(self):
133+
"""
134+
Annotation file with custom annotation types
124135
125-
# Read data using WFDB python package
136+
Target file created with:
137+
rdann -r sample-data/1003 -a atr > ann-3
138+
"""
126139
annotation = wfdb.rdann('sample-data/1003', 'atr')
127140

128141
# Target data from WFDB software package

0 commit comments

Comments
 (0)