如何以 junit xml 格式存储 doctest 的输出

How to store output of doctest in a junit xml format

如何将 python 中 doctest 生成的输出保存到 junit xml 文件中?

运行 来自 doctest 文件所在目录的以下命令

python -m pytest -v --junitxml=./.xml