Skip to content

Commit

Permalink
Testing a regex in test_statistic_class.py
Browse files Browse the repository at this point in the history
  • Loading branch information
emprzy committed Dec 2, 2024
1 parent ad623ab commit a3b5f62
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a3b5f62

Please sign in to comment.