summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-12-20 16:37:27 (GMT)
committerBarry Warsaw <barry@python.org>2001-12-20 16:37:27 (GMT)
commiteae36ac5c3e69cc28175af15a1bd6b6c1bcdfa0b (patch)
tree0e263413a5c7db24fd4efc4be2dcc07cd8af0bf9 /Lib/test
parent5e08d10dd975c439e252cf28c576bf034cf91bef (diff)
downloadcpython-eae36ac5c3e69cc28175af15a1bd6b6c1bcdfa0b.zip
cpython-eae36ac5c3e69cc28175af15a1bd6b6c1bcdfa0b.tar.gz
cpython-eae36ac5c3e69cc28175af15a1bd6b6c1bcdfa0b.tar.bz2
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.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_email.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_email.py b/Lib/test/test_email.py
index ddc36f3..5be7e95 100644
--- a/Lib/test/test_email.py
+++ b/Lib/test/test_email.py
@@ -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