def test_large_window_len(self): with pytest.raises(ValueError) as e_info: _ = tstoolbox.filter("flat", "lowpass", input_ts="tests/data_sine.csv", window_len=1000) assert r"Input vector (length=" in str(e_info.value)
def test_filter_fft_lowpass(self): out = tstoolbox.filter('fft_lowpass', input_ts='tests/data_sine.csv', print_input=True, cutoff_period=50) self.maxDiff = None assert_frame_equal(out, self.fft_lowpass, check_column_type=False)
def test_small_window_len(self): out = tstoolbox.filter("flat", input_ts="tests/data_sine.csv", window_len=2) out1 = tstoolbox.read("tests/data_sine.csv") out1.columns = ["Value::filter"] # NOp assert_frame_equal(out, out1)
def test_small_window_len(self): out = tstoolbox.filter('flat', input_ts='tests/data_sine.csv', window_len=2) out1 = tstoolbox.read('tests/data_sine.csv') out1.columns = ['Value_filter'] # NOp assert_frame_equal(out, out1)
def test_small_window_len(self): out = tstoolbox.filter('flat', input_ts='tests/data_sine.csv', window_len=2) out1 = tstoolbox.read('tests/data_sine.csv') out1.columns = ['Value::filter'] # NOp assert_frame_equal(out, out1)
def test_filter_hanning(self): out = tstoolbox.filter( "hanning", "lowpass", input_ts="tests/data_sine.csv", print_input=True, window_len=5, ) self.maxDiff = None assert_frame_equal(out, self.hanning, check_column_type=False)
def test_filter_fft_lowpass(self): out = tstoolbox.filter( "fft", "lowpass", input_ts="tests/data_sine.csv", print_input=True, lowpass_cutoff=50, window_len=5, ) self.maxDiff = None assert_frame_equal(out, self.fft_lowpass, check_column_type=False)
def test_filter_hanning(self): out = tstoolbox.filter('hanning', input_ts='tests/data_sine.csv', print_input=True) self.maxDiff = None assert_frame_equal(out, self.hanning, check_column_type=False)
def test_filter_type(self): with pytest.raises(ValueError) as e_info: _ = tstoolbox.filter('flatter', input_ts='tests/data_sine.csv') assert r'Filter type ' in str(e_info.value)
def test_filter_flat(self): out = tstoolbox.filter("flat", input_ts="tests/data_sine.csv", print_input=True) self.maxDiff = None assert_frame_equal(out, self.flat_3, check_column_type=False)
def test_filter_type(self): with pytest.raises(ValueError) as e_info: _ = tstoolbox.filter("flatter", input_ts="tests/data_sine.csv") assert r"Filter type " in str(e_info.value)
def test_filter_type(self): with assert_raises_regexp(AssertionError, r"Filter type "): out = tstoolbox.filter('flatter', input_ts='tests/data_sine.csv')
def test_filter_type(self): with pytest.raises(ValueError) as e_info: _ = tstoolbox.filter("flatter", "lowpass", input_ts="tests/data_sine.csv") assert r'The argument "filter_type" should be' in str(e_info.value)
def test_large_window_len(self): with pytest.raises(ValueError) as e_info: _ = tstoolbox.filter('flat', input_ts='tests/data_sine.csv', window_len=1000) assert r'Input vector (length=' in str(e_info.value)
def test_large_window_len(self): with assert_raises_regexp(AssertionError, "Input vector \(length="): out = tstoolbox.filter('flat', input_ts='tests/data_sine.csv', window_len=1000)