Merge from 3.2 (Issue #15095: Use better assertions in test_imaplib)