]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-108303: Move `smtpd` to `test.support` (#114368)
authorNikita Sobolev <mail@sobolevn.me>
Mon, 22 Jan 2024 13:36:29 +0000 (16:36 +0300)
committerGitHub <noreply@github.com>
Mon, 22 Jan 2024 13:36:29 +0000 (14:36 +0100)
Update test_logging.py and test_smtplib.py.

Lib/test/support/smtpd.py [moved from Lib/test/smtpd.py with 100% similarity]
Lib/test/test_logging.py
Lib/test/test_smtplib.py

similarity index 100%
rename from Lib/test/smtpd.py
rename to Lib/test/support/smtpd.py
index 0be269811842138754d52ffc2a82f13d1c82f356..908e242b85f5e7ac832525f4298e8a480267e4c3 100644 (file)
@@ -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:
index f2e02dab1c3ca53ca002d7bdffb9ad43fb92ba1d..4c9fc14bd43f548d63a509b144d5d05432f69ed0 100644 (file)
@@ -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)