python-3.x - 如何在不更改 css 的情况下共享 pytest-html 的 html

我正在使用 python 3.6 和 pytest-html 生成 HTML 报告。 一切正常,但是当我向我的经理分享我的 html 报告时,整个文档的 css 位置不对。有人能告诉我发生这种情况的原因和解决方案吗。

我运行时的报告 View :

当我与我的经理共享文档时的报告 View

最佳答案

在调用 pytest 时包含 --self-contained-html...例如 pytest your.pyfilename --html=pathandfilename --self-contained-html.

您的结果文件中包含内联 css。

关于python-3.x - 如何在不更改 css 的情况下共享 pytest-html 的 html 报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50640996/

相关文章:

python - 如何使用具有 NaN 值的 Pandas 计算中位数?

java - 如何为不同类型的异常设置不同的状态码

xamarin - 类型 'StackLayout' 的值不能添加到类型 'IList' 的集合或字

javascript - 如何从url获取json数据并保存到const变量【TypeScript】

php - 如何显示在 php 中使用 file_get_contents 检索到的 pdf?

qt - 没有安装 qmlscene : why is a warning sign next to

reactjs - 我如何模拟 reactjs 中的 promise ?

powershell - 在 PowerShell 中比较字符串中的日期

angular - 如何指定从根目录到 Assets Angular 的路径?

r - 重新启动的组计数器(使用 R data.table)