Commit df600ad
committed
doctest_docutils(feat[async]): Add AsyncDocTestRunner for top-level await
why: Enable clean async doctests without asyncio.run() boilerplate
what:
- Add _Runner310 shim for Python 3.10 compatibility (asyncio.Runner is 3.11+)
- Add _run_doctest_example() with PyCF_ALLOW_TOP_LEVEL_AWAIT compile flag
- Add AsyncDocTestRunner extending DocTestRunner with async support
- Add AsyncDebugRunner for raise-on-error behavior
- Rename testdocutils -> run_doctest_docutils to avoid pytest collection
- Detect CO_COROUTINE flag to transparently handle sync vs async code1 parent f6d2a0f commit df600ad
1 file changed
Lines changed: 376 additions & 5 deletions
0 commit comments