def test_remote_regressor_getSmoothLen(monkeypatch): """Test remote regressor process""" from resistics.regression.remote import RemoteRegressor from mocks import mock_window_selector import numpy as np selector = mock_window_selector() regressor = RemoteRegressor(selector, "test") regressor.setInput("site1", ["Hx", "Hy"]) regressor.setOutput("site1", ["Ex", "Ey"]) regressor.setRemote("remote1", ["Hx", "Hy"]) regressor.setSmooth("hann", 1) assert regressor.smoothLen == 1 regressor.setSmooth("hann", 12) assert regressor.getSmoothLen(65) == 13
def test_remote_regressor_setSmooth(): """Test remote regressor setSmooth""" from resistics.regression.remote import RemoteRegressor from mocks import mock_window_selector selector = mock_window_selector() regressor = RemoteRegressor(selector, "test") assert regressor.smoothFunc == "hann" assert regressor.smoothLen is None regressor.setSmooth("hann", 7) assert regressor.smoothFunc == "hann" assert regressor.smoothLen == 7 regressor.setSmooth("parzen", 8) assert regressor.smoothFunc == "parzen" assert regressor.smoothLen == 8 assert regressor.getSmoothLen(65) == 9