mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +00:00
add asyncio exception handler test
This commit is contained in:
parent
5a4dbffbae
commit
e22f8db526
@ -1 +1,16 @@
|
||||
# TODO: write tests
|
||||
import asyncio
|
||||
|
||||
from mitmproxy.test.taddons import RecordingMaster
|
||||
|
||||
|
||||
async def err():
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
async def test_exception_handler():
|
||||
m = RecordingMaster(None)
|
||||
running = asyncio.create_task(m.run())
|
||||
asyncio.create_task(err())
|
||||
await m.await_log("Traceback", level="error")
|
||||
m.shutdown()
|
||||
await running
|
||||
|
Loading…
Reference in New Issue
Block a user