Skip to content

Commit 4cd1d7b

Browse files
author
Benjamin Moody
committed
TestRecord: test rdrecord with the return_res parameter.
1 parent 186ae72 commit 4cd1d7b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/test_record.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,22 @@ def test_1a(self):
2626
Target file created with:
2727
rdsamp -r sample-data/test01_00s | cut -f 2- > record-1a
2828
"""
29-
record = wfdb.rdrecord('sample-data/test01_00s', physical=False)
29+
record = wfdb.rdrecord('sample-data/test01_00s',
30+
physical=False, return_res=16)
3031
sig = record.d_signal
3132
sig_target = np.genfromtxt('tests/target-output/record-1a')
3233

3334
# Compare data streaming from Physionet
34-
record_pn = wfdb.rdrecord('test01_00s', physical=False,
35-
pn_dir='macecgdb')
35+
record_pn = wfdb.rdrecord('test01_00s', pn_dir='macecgdb',
36+
physical=False, return_res=16)
3637

3738
# Test file writing
38-
record_2 = wfdb.rdrecord('sample-data/test01_00s', physical=False)
39+
record_2 = wfdb.rdrecord('sample-data/test01_00s',
40+
physical=False, return_res=16)
3941
record_2.sig_name = ['ECG_1', 'ECG_2', 'ECG_3', 'ECG_4']
4042
record_2.wrsamp()
41-
record_write = wfdb.rdrecord('test01_00s', physical=False)
43+
record_write = wfdb.rdrecord('test01_00s',
44+
physical=False, return_res=16)
4245

4346
assert np.array_equal(sig, sig_target)
4447
assert record.__eq__(record_pn)

0 commit comments

Comments
 (0)