我正在从PyCharm启动我的测试,一旦测试完成,我想创建一个报告。我怎么能在我的代码中做到这一点?
我看到了pytest_html模块,但是我只看到了一个cmd.exe上的命令(pytest --html=report.html --self-contained-html),我想知道如何在我的程序中直接这么做?
发布于 2019-11-04 18:13:29
一种选择是:
import subprocess
subprocess.run("pytest --html=report.html --self-contained-html",shell=True)https://stackoverflow.com/questions/54238002
复制相似问题