Skip to content

Commit

Permalink
pythongh-108303: Move smtpd to test.support (python#114368)
Browse files Browse the repository at this point in the history
Update test_logging.py and test_smtplib.py.
  • Loading branch information
sobolevn authored and aisk committed Feb 11, 2024
1 parent 6ff8bed commit b554d69
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
File renamed without changes.
4 changes: 1 addition & 3 deletions Lib/test/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
from test.support import threading_helper
from test.support import warnings_helper
from test.support import asyncore
from test.support import smtpd
from test.support.logging_helper import TestHandler
import textwrap
import threading
Expand All @@ -63,9 +64,6 @@
from socketserver import (ThreadingUDPServer, DatagramRequestHandler,
ThreadingTCPServer, StreamRequestHandler)

with warnings.catch_warnings():
from . import smtpd

try:
import win32evtlog, win32evtlogutil, pywintypes
except ImportError:
Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test_smtplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
from test.support import socket_helper
from test.support import threading_helper
from test.support import asyncore
from test.support import smtpd
from unittest.mock import Mock

from . import smtpd


support.requires_working_socket(module=True)

Expand Down

0 comments on commit b554d69

Please sign in to comment.