Skip to content
Snippets Groups Projects
Commit 0d66c926 authored by Kien Le's avatar Kien Le
Browse files

Add a test for trim_downsample_WFChan

parent fa695cf7
No related branches found
No related tags found
1 merge request!33Add tests and refactor trim_downsample_WFChan
......@@ -281,6 +281,16 @@ class TestTrimDownsampleWfChan(TestCase):
self.assertTrue('data' not in self.channel_data)
const.RECAL_SIZE_LIMIT = ORIGINAL_RECAL_SIZE_LIMIT
@patch('sohstationviewer.model.handling_data.trim_waveform_data',
wraps=trim_waveform_data)
@patch('sohstationviewer.model.handling_data.downsample_waveform_data',
wraps=downsample_waveform_data)
def test_data_trim_and_downsampled(self, mock_downsample, mock_trim):
trim_downsample_WFChan(self.channel_data, self.start_time,
self.end_time, False)
self.assertTrue(mock_trim.called)
self.assertTrue(mock_downsample.called)
class TestGetTrimTpsData(TestCase):
def no_file_memmap(self, file_path: Path, **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment