Add test for new logic in pytest_sessionstart