Simplified check for earlier versions of pytest