summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2024-01-22 13:36:29 (GMT)
committerGitHub <noreply@github.com>2024-01-22 13:36:29 (GMT)
commit8f5e7d739f56a75022dfe8fa24675b6c7b321ab5 (patch)
tree398a19e1bbcfeedf1575bafec34bd1bdae8f43a5
parentc8351a617b8970dbe0d3af721c6aea873019c466 (diff)
downloadcpython-8f5e7d739f56a75022dfe8fa24675b6c7b321ab5.zip
cpython-8f5e7d739f56a75022dfe8fa24675b6c7b321ab5.tar.gz
cpython-8f5e7d739f56a75022dfe8fa24675b6c7b321ab5.tar.bz2
gh-108303: Move `smtpd` to `test.support` (#114368)
Update test_logging.py and test_smtplib.py.
-rwxr-xr-xLib/test/support/smtpd.py (renamed from Lib/test/smtpd.py)0
-rw-r--r--Lib/test/test_logging.py4
-rw-r--r--Lib/test/test_smtplib.py3
3 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/smtpd.py b/Lib/test/support/smtpd.py
index 6052232..6052232 100755
--- a/Lib/test/smtpd.py
+++ b/Lib/test/support/smtpd.py
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 0be2698..908e242 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -49,6 +49,7 @@ from test.support import socket_helper
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
@@ -63,9 +64,6 @@ from urllib.parse import urlparse, parse_qs
from socketserver import (ThreadingUDPServer, DatagramRequestHandler,
ThreadingTCPServer, StreamRequestHandler)
-with warnings.catch_warnings():
- from . import smtpd
-
try:
import win32evtlog, win32evtlogutil, pywintypes
except ImportError:
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py
index f2e02da..4c9fc14 100644
--- a/Lib/test/test_smtplib.py
+++ b/Lib/test/test_smtplib.py
@@ -22,10 +22,9 @@ from test.support import hashlib_helper
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)