import time
import calendar
import threading
+import socket
from test.support import (reap_threads, verbose, transient_internet,
run_with_tz, run_with_locale, cpython_only)
imaplib.Time2Internaldate(t)
def test_imap4_host_default_value(self):
+ # Check whether the IMAP4_PORT is truly unavailable.
+ with socket.socket() as s:
+ try:
+ s.connect(('', imaplib.IMAP4_PORT))
+ self.skipTest(
+ "Cannot run the test with local IMAP server running.")
+ except socket.error:
+ pass
+
expected_errnos = [
# This is the exception that should be raised.
errno.ECONNREFUSED,