Skip to content

Commit 9a0d086

Browse files
author
Benjamin Moody
committed
Test writing an originally-multi-frequency record with expanded=False.
1 parent fc4cfec commit 9a0d086

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/test_record.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,22 @@ def test_4d(self):
633633

634634
assert np.array_equal(sig_round, sig_target)
635635

636+
def test_write_smoothed(self):
637+
"""
638+
Test writing a record after reading with smooth_frames
639+
"""
640+
record = wfdb.rdrecord(
641+
"sample-data/drive02",
642+
physical=False,
643+
smooth_frames=True,
644+
)
645+
record.wrsamp(write_dir=self.temp_path)
646+
record2 = wfdb.rdrecord(
647+
os.path.join(self.temp_path, "drive02"),
648+
physical=False,
649+
)
650+
np.testing.assert_array_equal(record.d_signal, record2.d_signal)
651+
636652
def test_to_dataframe(self):
637653
record = wfdb.rdrecord("sample-data/test01_00s")
638654
df = record.to_dataframe()

0 commit comments

Comments
 (0)