[Python-checkins] [2.7] bpo-31627: Make test_mailbox be lenient to empty hostname. (GH-3821) (#3838)

Serhiy Storchaka webhook-mailer at python.org
Sat Sep 30 15:52:28 EDT 2017


https://github.com/python/cpython/commit/1163fb9be08c6072455b59d6f954e60662d18e75
commit: 1163fb9be08c6072455b59d6f954e60662d18e75
branch: 2.7
author: Serhiy Storchaka <storchaka at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-09-30T22:52:25+03:00
summary:

[2.7] bpo-31627: Make test_mailbox be lenient to empty hostname. (GH-3821) (#3838)

(cherry picked from commit f4ea642cb60556231e714089a79d3c59c202661e)

files:
M Lib/test/test_mailbox.py

diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py
index 2261bb854cb..f8db5d5723f 100644
--- a/Lib/test/test_mailbox.py
+++ b/Lib/test/test_mailbox.py
@@ -654,7 +654,7 @@ def test_create_tmp(self, repetitions=10):
             hostname = hostname.replace(':', r'\072')
         pid = os.getpid()
         pattern = re.compile(r"(?P<time>\d+)\.M(?P<M>\d{1,6})P(?P<P>\d+)"
-                             r"Q(?P<Q>\d+)\.(?P<host>[^:/]+)")
+                             r"Q(?P<Q>\d+)\.(?P<host>[^:/]*)")
         previous_groups = None
         for x in xrange(repetitions):
             tmp_file = self._box._create_tmp()



More information about the Python-checkins mailing list