]> granicus.if.org Git - python/commitdiff
[2.7] bpo-31627: Make test_mailbox be lenient to empty hostname. (GH-3821) (#3838)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 30 Sep 2017 19:52:25 +0000 (22:52 +0300)
committerGitHub <noreply@github.com>
Sat, 30 Sep 2017 19:52:25 +0000 (22:52 +0300)
(cherry picked from commit f4ea642cb60556231e714089a79d3c59c202661e)

Lib/test/test_mailbox.py

index 2261bb854cb765ca7db0780fc3024b1ba4bc48a0..f8db5d5723fb280a36b2059f221739d53b42b84d 100644 (file)
@@ -654,7 +654,7 @@ class TestMaildir(TestMailbox, unittest.TestCase):
             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()