def test_raises_error(self, val, format_dict, expected_error_message): with pytest.raises(ValueError, match=expected_error_message): _format_object(val, format_dict)
def test_simple_replace(self, val, format_dict, expected): assert _format_object(val, format_dict) == expected