Ejemplo n.º 1
0
def test_actual_results_dtw_region(params, res_desired):
    """Test that the actual results are the expected ones."""
    (dtw_actual, cost_mat_actual, acc_cost_mat_actual,
     path_actual) = dtw_region(x, y, **params_return, **params)
    np.testing.assert_allclose(cost_mat_actual, res_desired['cost_mat'])
    np.testing.assert_allclose(dtw_actual, res_desired['dtw'])
    np.testing.assert_allclose(path_actual, res_desired['path'])
    np.testing.assert_allclose(acc_cost_mat_actual,
                               res_desired['acc_cost_mat'])
Ejemplo n.º 2
0
def test_parameter_check_dtw_region(params, err_msg):
    """Test parameter validation."""
    with pytest.raises(ValueError, match=re.escape(err_msg)):
        dtw_region(x, y, **params)