Skip to content

Commit 5727398

Browse files
Update comments/blurb
1 parent 540b8d9 commit 5727398

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Lib/test/test_email/test_generator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,9 @@ def _patch_random_randrange(*args, **kwargs):
314314
msg = MIMEMultipart()
315315
msg.attach(MIMEText(boundary_in_part))
316316
self.genclass(self.ioclass()).flatten(msg, linesep=linesep)
317-
# .0 is appended if the boundary was found.
317+
# Generator checks the message content for the string it is about
318+
# to use as a boundary ('token' in this test) and when it finds it
319+
# in our attachment appends .0 to make the boundary it uses unique.
318320
self.assertEqual(msg.get_boundary(), boundary + ".0")
319321

320322
def test_lf_boundary_detection(self):
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
``email.generator.Generator._make_boundary`` now correctly finds the
2-
boundary when using CRLF linesep.
1+
``email.generator.Generator._make_boundary`` could fail to detect a duplicate
2+
boundary string if linesep was not \n. It now correctly detects boundary
3+
strings when linesep is \r\n as well.

0 commit comments

Comments
 (0)