diff options
Diffstat (limited to 'Lib/email/test')
| -rw-r--r-- | Lib/email/test/test_email.py | 6 | ||||
| -rw-r--r-- | Lib/email/test/test_email_renamed.py | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index d97769362b..a197a36180 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -2215,6 +2215,12 @@ class TestMiscellaneous(TestEmailBase): ['foo: ;', '"Jason R. Mastaler" <jason@dom.ain>']), [('', ''), ('Jason R. Mastaler', 'jason@dom.ain')]) + def test_getaddresses_embedded_comment(self): + """Test proper handling of a nested comment""" + eq = self.assertEqual + addrs = Utils.getaddresses(['User ((nested comment)) <foo@bar.com>']) + eq(addrs[0][1], 'foo@bar.com') + def test_utils_quote_unquote(self): eq = self.assertEqual msg = Message() diff --git a/Lib/email/test/test_email_renamed.py b/Lib/email/test/test_email_renamed.py index 4ac2ee91da..95d06cb66f 100644 --- a/Lib/email/test/test_email_renamed.py +++ b/Lib/email/test/test_email_renamed.py @@ -2221,6 +2221,12 @@ class TestMiscellaneous(TestEmailBase): ['foo: ;', '"Jason R. Mastaler" <jason@dom.ain>']), [('', ''), ('Jason R. Mastaler', 'jason@dom.ain')]) + def test_getaddresses_embedded_comment(self): + """Test proper handling of a nested comment""" + eq = self.assertEqual + addrs = utils.getaddresses(['User ((nested comment)) <foo@bar.com>']) + eq(addrs[0][1], 'foo@bar.com') + def test_utils_quote_unquote(self): eq = self.assertEqual msg = Message() |
