]> granicus.if.org Git - python/commitdiff
A specific test for bug #481221, getaddrlist() failing on long
authorBarry Warsaw <barry@python.org>
Tue, 13 Nov 2001 21:33:52 +0000 (21:33 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 13 Nov 2001 21:33:52 +0000 (21:33 +0000)
addresses.  Commented out because it still takes too long to run.

Lib/test/test_rfc822.py

index cc6e27ba3cbea175058ee16fc2030bd142db3e01..0244f0d818350079c028b672a40f1826a41432cc 100644 (file)
@@ -185,6 +185,14 @@ class MessageTestCase(unittest.TestCase):
         self.check('To: User J. Person <person@dom.ain>\n\n',
                    [('User J. Person', 'person@dom.ain')])
 
+    # This takes to long to add to the test suite
+##    def test_an_excrutiatingly_long_address_field(self):
+##        OBSCENELY_LONG_HEADER_MULTIPLIER = 10000
+##        oneaddr = ('Person' * 10) + '@' + ('.'.join(['dom']*10)) + '.com'
+##        addr = ', '.join([oneaddr] * OBSCENELY_LONG_HEADER_MULTIPLIER)
+##        lst = rfc822.AddrlistClass(addr).getaddrlist()
+##        self.assertEqual(len(lst), OBSCENELY_LONG_HEADER_MULTIPLIER)
+
 
 def test_main():
     test_support.run_unittest(MessageTestCase)