mirror of https://github.com/python/cpython
gh-108303: Move `smtpd` to `test.support` (#114368)
Update test_logging.py and test_smtplib.py.
This commit is contained in:
parent
c8351a617b
commit
8f5e7d739f
|
@ -49,6 +49,7 @@ from test.support import socket_helper
|
||||||
from test.support import threading_helper
|
from test.support import threading_helper
|
||||||
from test.support import warnings_helper
|
from test.support import warnings_helper
|
||||||
from test.support import asyncore
|
from test.support import asyncore
|
||||||
|
from test.support import smtpd
|
||||||
from test.support.logging_helper import TestHandler
|
from test.support.logging_helper import TestHandler
|
||||||
import textwrap
|
import textwrap
|
||||||
import threading
|
import threading
|
||||||
|
@ -63,9 +64,6 @@ from urllib.parse import urlparse, parse_qs
|
||||||
from socketserver import (ThreadingUDPServer, DatagramRequestHandler,
|
from socketserver import (ThreadingUDPServer, DatagramRequestHandler,
|
||||||
ThreadingTCPServer, StreamRequestHandler)
|
ThreadingTCPServer, StreamRequestHandler)
|
||||||
|
|
||||||
with warnings.catch_warnings():
|
|
||||||
from . import smtpd
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import win32evtlog, win32evtlogutil, pywintypes
|
import win32evtlog, win32evtlogutil, pywintypes
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
|
@ -22,10 +22,9 @@ from test.support import hashlib_helper
|
||||||
from test.support import socket_helper
|
from test.support import socket_helper
|
||||||
from test.support import threading_helper
|
from test.support import threading_helper
|
||||||
from test.support import asyncore
|
from test.support import asyncore
|
||||||
|
from test.support import smtpd
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
|
|
||||||
from . import smtpd
|
|
||||||
|
|
||||||
|
|
||||||
support.requires_working_socket(module=True)
|
support.requires_working_socket(module=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue