Via https://github.com/pytest-dev/pytest/pull/6604#discussion_r371960832. Test: https://github.com/pytest-dev/pytest/commit/2defdce483007d644abbd4153d778fda0e61579b#diff-d5a889dacc2233899929e125c3532afcR3706-R3720