Python 禁止打印用于pytest的标题

Python 禁止打印用于pytest的标题,python,testing,printing,pytest,Python,Testing,Printing,Pytest,如何禁止打印标题(~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

如何禁止打印标题(~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将抑制标头(但也可能抑制其他信息)


pytest
6.0:

中添加了
--no header
选项,我已经知道了。但我希望能单独压制头球。