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

Serhiy Storchaka webhook-mailer at python.org
Sat Sep 30 10:11:00 EDT 2017


https://github.com/python/cpython/commit/f4ea642cb60556231e714089a79d3c59c202661e
commit: f4ea642cb60556231e714089a79d3c59c202661e
branch: master
author: Serhiy Storchaka <storchaka at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-09-30T17:10:57+03:00
summary:

bpo-31627: Make test_mailbox be lenient to empty hostname. (#3821)

files:
M Lib/test/test_mailbox.py

diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py
index 2ba944335ae..3807b95b158 100644
--- a/Lib/test/test_mailbox.py
+++ b/Lib/test/test_mailbox.py
@@ -746,7 +746,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 range(repetitions):
             tmp_file = self._box._create_tmp()



More information about the Python-checkins mailing list