def test_match_default_not_last_arg(match_case):
    """Test that an error is thrown when the default case is not the last arg.

    Args:
        match_case: The cases to match.
    """
    with pytest.raises(
        ValueError,
        match="rx.match should have tuples of cases and a default case as the last argument.",
    ):
        Match.create(MatchState.value, *match_case)
Test that an error is thrown when the default case is not the last arg.

    Args:
        match_case: The cases to match.
    
tests/units/components/core/test_match.py