Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 135cce8

Browse files
committed
A specific test for bug #481221, getaddrlist() failing on long
addresses. Commented out because it still takes too long to run.
1 parent f1fd282 commit 135cce8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Lib/test/test_rfc822.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,14 @@ def test_rfc2822_phrases(self):
185185
self.check('To: User J. Person <[email protected]>\n\n',
186186
[('User J. Person', '[email protected]')])
187187

188+
# This takes to long to add to the test suite
189+
## def test_an_excrutiatingly_long_address_field(self):
190+
## OBSCENELY_LONG_HEADER_MULTIPLIER = 10000
191+
## oneaddr = ('Person' * 10) + '@' + ('.'.join(['dom']*10)) + '.com'
192+
## addr = ', '.join([oneaddr] * OBSCENELY_LONG_HEADER_MULTIPLIER)
193+
## lst = rfc822.AddrlistClass(addr).getaddrlist()
194+
## self.assertEqual(len(lst), OBSCENELY_LONG_HEADER_MULTIPLIER)
195+
188196

189197
def test_main():
190198
test_support.run_unittest(MessageTestCase)

0 commit comments

Comments
 (0)