Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e012e6

Browse files
committed
Issue #23211: Workaround test_logging failure on some OS X 10.6 systems:
getaddrinfo("localhost") can fail depending on the name server configuration, use "127.0.0.0" instead.
1 parent 465b057 commit 1e012e6

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/test/test_logging.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,10 +930,10 @@ class SMTPHandlerTest(BaseTest):
930930
TIMEOUT = 8.0
931931
def test_basic(self):
932932
sockmap = {}
933-
server = TestSMTPServer(('localhost', 0), self.process_message, 0.001,
933+
server = TestSMTPServer((support.HOST, 0), self.process_message, 0.001,
934934
sockmap)
935935
server.start()
936-
addr = ('localhost', server.port)
936+
addr = (support.HOST, server.port)
937937
h = logging.handlers.SMTPHandler(addr, 'me', 'you', 'Log',
938938
timeout=self.TIMEOUT)
939939
self.assertEqual(h.toaddrs, ['you'])

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ Tests
290290

291291
- Issue #22770: Prevent some Tk segfaults on OS X when running gui tests.
292292

293+
- Issue #23211: Workaround test_logging failure on some OS X 10.6 systems.
294+
293295
Build
294296
-----
295297

0 commit comments

Comments
 (0)