从 pytest 的打印中抑制 header
Supressing the header from printing for pytest
如何禁止打印 header(~4 行)?
============================= test session starts ==============================
platform linux -- Python 3.5.3, pytest-3.2.1, py-1.4.34, pluggy-0.4.0 -- /usr/bin/python3
cachedir: .cache
rootdir: /sandboxes/beetle, inifile:
collecting ... collected 1 item
运行 带有 -q 选项的 pytest 将抑制 header(但可能还有其他信息)
在 pytest
6.0 中添加了 --no-header
选项:https://docs.pytest.org/en/stable/changelog.html#id33
如何禁止打印 header(~4 行)?
============================= test session starts ==============================
platform linux -- Python 3.5.3, pytest-3.2.1, py-1.4.34, pluggy-0.4.0 -- /usr/bin/python3
cachedir: .cache
rootdir: /sandboxes/beetle, inifile:
collecting ... collected 1 item
运行 带有 -q 选项的 pytest 将抑制 header(但可能还有其他信息)
在 pytest
6.0 中添加了 --no-header
选项:https://docs.pytest.org/en/stable/changelog.html#id33