[Python-checkins] cpython: #10839: add new test file that was omitted from checkin

r.david.murray python-checkins at python.org
Tue May 29 18:31:38 CEST 2012


http://hg.python.org/cpython/rev/08857f4e9709
changeset:   77229:08857f4e9709
user:        R David Murray <rdmurray at bitdance.com>
date:        Tue May 29 12:31:11 2012 -0400
summary:
  #10839: add new test file that was omitted from checkin

files:
  Lib/test/test_email/test_message.py |  18 +++++++++++++++++
  1 files changed, 18 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_email/test_message.py b/Lib/test/test_email/test_message.py
new file mode 100644
--- /dev/null
+++ b/Lib/test/test_email/test_message.py
@@ -0,0 +1,18 @@
+import unittest
+from email import policy
+from test.test_email import TestEmailBase
+
+
+class Test(TestEmailBase):
+
+    policy = policy.default
+
+    def test_error_on_setitem_if_max_count_exceeded(self):
+        m = self._str_msg("")
+        m['To'] = 'abc at xyz'
+        with self.assertRaises(ValueError):
+            m['To'] = 'xyz at abc'
+
+
+if __name__ == '__main__':
+    unittest.main()

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list