FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-108303: Move `smtpd` to `test.support` by sobolevn · Pull Request #114368 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (3) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 1 addition & 3 deletions Lib/test/test_logging.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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():

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The change removes with warnings.catch_warnings(): but apparently, it's useless. The test still pass without it:

$ ./python -Werror -m test test_logging test_smtplib -j0
Using random seed: 1598323201
0:00:00 load avg: 0.96 Run 2 tests in parallel using 2 worker processes
0:00:02 load avg: 1.37 [1/2] test_smtplib passed
0:00:18 load avg: 1.22 [2/2] test_logging passed

== Tests result: SUCCESS ==

All 2 tests OK.

Total duration: 18.9 sec
Total tests: run=317 skipped=2
Total test files: run=2/2
Result: SUCCESS

from . import smtpd

try:
import win32evtlog, win32evtlogutil, pywintypes
except ImportError:
Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test_smtplib.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL