TST: properly test warnings