fixed an issue in pytest.
it was failing on version earlier than 8.0