diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-01-22 14:08:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 14:08:31 (GMT) |
commit | 58fdd15d5a70b0274ed5d4fc491700138aa51cdf (patch) | |
tree | d84dcd5a0e915547b2c7554bf7a5b8f7bc0ac8f3 /Lib | |
parent | 7da1750225807b40f951a1484d8f5feed3be0c71 (diff) | |
download | cpython-58fdd15d5a70b0274ed5d4fc491700138aa51cdf.zip cpython-58fdd15d5a70b0274ed5d4fc491700138aa51cdf.tar.gz cpython-58fdd15d5a70b0274ed5d4fc491700138aa51cdf.tar.bz2 |
[3.12] gh-108303: Move `smtpd` to `test.support` (GH-114368) (#114427)
gh-108303: Move `smtpd` to `test.support` (GH-114368)
Update test_logging.py and test_smtplib.py.
(cherry picked from commit 8f5e7d739f56a75022dfe8fa24675b6c7b321ab5)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/test/support/smtpd.py (renamed from Lib/test/smtpd.py) | 0 | ||||
-rw-r--r-- | Lib/test/test_logging.py | 4 | ||||
-rw-r--r-- | Lib/test/test_smtplib.py | 3 |
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 635dd7c..d1ec2d6 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 b6d5b8c..4d8e143 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) |