diff --git a/flepimop/gempyor_pkg/tests/statistics/test_statistic_class.py b/flepimop/gempyor_pkg/tests/statistics/test_statistic_class.py index 18a5e94b0..274a344bf 100644 --- a/flepimop/gempyor_pkg/tests/statistics/test_statistic_class.py +++ b/flepimop/gempyor_pkg/tests/statistics/test_statistic_class.py @@ -520,7 +520,11 @@ def test_compute_logloss_data_misshape_value_error( model_rows, model_cols = mock_inputs.model_data[mock_inputs.config["sim_var"]].shape gt_rows, gt_cols = mock_inputs.gt_data[mock_inputs.config["data_var"]].shape - expected_match = rf".*'{mock_inputs.model_data[mock_inputs.config['sim_var']].shape}'.*'{mock_inputs.gt_data[mock_inputs.config['data_var']].shape}'" + expected_match = ( + rf"`model_data` and `gt_data` do not have the same shape: " + rf"`model_data.shape` = '{mock_inputs.model_data[mock_inputs.config['sim_var']].shape}' " + rf"!= `gt_data.shape` = '{mock_inputs.gt_data[mock_inputs.config['data_var']].shape}'." + ) with pytest.raises(ValueError, match=expected_match): statistic.compute_logloss(mock_inputs.model_data, mock_inputs.gt_data)