I would think most people who purchase from a grocery store just hope for the best and pitch the produce in the garbage or compost heap if it test poorly.
Some have said that they are sometimes allowed to test produce at Farmers Markets before buying.