mirror of
https://github.com/simonw/datasette.git
synced 2026-09-02 22:54:08 +02:00
Rename crasher test helper to satisfy codespell
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012U7coQfVu8nK2R4q2mCULA
This commit is contained in:
parent
32b04b44cd
commit
561fc3f2f4
1 changed files with 3 additions and 3 deletions
|
|
@ -244,14 +244,14 @@ async def test_crashing_task_logs_traceback_and_state_is_crashed(caplog):
|
|||
|
||||
survivor_ran = asyncio.Event()
|
||||
|
||||
async def crasher(datasette):
|
||||
async def crashing_task(datasette):
|
||||
raise RuntimeError("kaboom")
|
||||
|
||||
async def survivor(datasette):
|
||||
survivor_ran.set()
|
||||
|
||||
with caplog.at_level(logging.ERROR, logger="datasette.background_tasks"):
|
||||
crash_handle = ds.add_background_task(crasher, name="crasher")
|
||||
crash_handle = ds.add_background_task(crashing_task, name="crashing_task")
|
||||
survivor_handle = ds.add_background_task(survivor, name="survivor")
|
||||
await asyncio.wait_for(
|
||||
asyncio.gather(
|
||||
|
|
@ -268,7 +268,7 @@ async def test_crashing_task_logs_traceback_and_state_is_crashed(caplog):
|
|||
assert survivor_ran.is_set()
|
||||
assert survivor_handle.state == "completed"
|
||||
|
||||
assert "crasher" in caplog.text
|
||||
assert "crashing_task" in caplog.text
|
||||
assert "kaboom" in caplog.text
|
||||
assert "Traceback" in caplog.text
|
||||
assert "RuntimeError" in caplog.text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue