catch warnings in test