diff --git a/tests/test_speed_math.py b/tests/test_speed_math.py index 15aba0b..80cd37d 100644 --- a/tests/test_speed_math.py +++ b/tests/test_speed_math.py @@ -171,6 +171,17 @@ async def test_an_empty_cascade_is_a_failed_result(): assert result.tier_attempts == [] +async def test_cascade_records_exception_class_name_when_no_message_provided(): + async def bad() -> SpeedResult: + raise Exception() + + result = await run_speed_cascade([("bad", bad)]) + assert result.method == "none" + assert len(result.tier_attempts) == 1 + assert result.tier_attempts[0].ok is False + assert result.tier_attempts[0].reason == "Exception" + + async def test_cascade_never_swallows_cancellation(): import asyncio