]> granicus.if.org Git - python/commitdiff
bpo-31627: Make test_mailbox be lenient to empty hostname. (#3821)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 30 Sep 2017 14:10:57 +0000 (17:10 +0300)
committerGitHub <noreply@github.com>
Sat, 30 Sep 2017 14:10:57 +0000 (17:10 +0300)
Lib/test/test_mailbox.py

index 2ba944335ae87db5ee9fc8254d9e4aa2ea9780bb..3807b95b158263a7c162e9da7504dc4cd1f620cf 100644 (file)
@@ -746,7 +746,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 range(repetitions):
             tmp_file = self._box._create_tmp()