mirror of https://github.com/python/cpython
test_parseaddr_empty(): New test for assuring that
Utils.parseaddr('<>') -- i.e. on an empty address, returns the empty string. Built on rfc822, this used to return None.
This commit is contained in:
parent
5e08d10dd9
commit
eae36ac5c3
|
@ -952,6 +952,10 @@ class TestMiscellaneous(unittest.TestCase):
|
|||
def test_parsedate_none(self):
|
||||
self.assertEqual(Utils.parsedate(''), None)
|
||||
|
||||
def test_parseaddr_empty(self):
|
||||
self.assertEqual(Utils.parseaddr('<>'), ('', ''))
|
||||
self.assertEqual(Utils.dump_address_pair(Utils.parseaddr('<>')), '')
|
||||
|
||||
|
||||
|
||||
# Test the iterator/generators
|
||||
|
|
Loading…
Reference in New Issue