New submission from Serhiy Storchaka <[email protected]>:
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 <[email protected]>
<https://bugs.python.org/issue31627>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com