From: https://github.com/pytest-dev/pytest/pull/7142#discussion_r435084751
From: #7142 (comment)