Use tm.assert_produces_warning