def test_re_0_10_rating(test_input, expected):
    """Check that re_0_10_rating can extract the correct score from a string."""

    try:
        result = feedback_generated.re_0_10_rating(test_input)
    except feedback_generated.ParseError:
        result = None

    assert (
        result == expected
    ), f"Failed on {test_input}: expected {expected}, got {result}"
Check that re_0_10_rating can extract the correct score from a string.
tests/unit/test_feedback_score_generation.py