capture_io doctest run by `make test_doc_test`