awestlake87 / pyo3-asyncio

Other
300 stars 45 forks source link

tokio_test: add panic message into exception string #92

Closed chris-pattern closed 7 months ago

chris-pattern commented 1 year ago

Add future's panic message into python exception string. I didn't test this. I don't know if tokio_test macro is covered by y'alls tests.

awestlake87 commented 1 year ago

Apologies for the delay. I think this would be a nice addition. Let me check it out and review it

chris-pattern commented 1 year ago

I tried a bunch of stuff in my branch but couldn't get the boxed panic to unwrap as a &'static str. Very frustrating.

The result of into_panic is a Box<Any>. Unwrapping this Any as a &'static str didn't work. I tried a bunch of things and came to the conclusion that it could be unwrapped into Box<Any + Send + Sync> or something like that. But then I couldn't figure out how to unwrap the inner Any and gave up.

awestlake87 commented 7 months ago

Already merged!