[New-bugs-announce] [issue31627] test_mailbox if the hostname is empty
Serhiy Storchaka
report at bugs.python.org
Fri Sep 29 03:17:31 EDT 2017
New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:
On just installed FreeBSD the hostname is empty. This causes a failure of test_mailbox.
======================================================================
FAIL: test_create_tmp (test.test_mailbox.TestMaildir)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/home/serhiy/py/cpython3.7-debug/Lib/test/test_mailbox.py", line 758, in test_create_tmp
self.assertIsNotNone(match, "Invalid file name: '%s'" % tail)
AssertionError: unexpectedly None : Invalid file name: '1506668827.M125806P21276Q34.'
----------------------------------------------------------------------
Changing the "+" qualifier to the "*" qualifier in the regex pattern fixes the issue.
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>[^:/]*)")
----------
components: FreeBSD, Tests, email
messages: 303304
nosy: barry, koobs, r.david.murray, serhiy.storchaka, skrah
priority: normal
severity: normal
status: open
title: test_mailbox if the hostname is empty
type: behavior
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31627>
_______________________________________
More information about the New-bugs-announce
mailing list