mirror of
https://github.com/Horizontal42/netsleuth.git
synced 2026-11-10 19:12:03 +03:00
cover empty exception message branch in run_speed_cascade
This commit is contained in:
parent
8e7d5bba5b
commit
2a72bdb441
1 changed files with 11 additions and 0 deletions
|
|
@ -171,6 +171,17 @@ async def test_an_empty_cascade_is_a_failed_result():
|
||||||
assert result.tier_attempts == []
|
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():
|
async def test_cascade_never_swallows_cancellation():
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue