Skip to content

Commit 9ccd502

Browse files
committed
Trim redundant test comments
1 parent 24af346 commit 9ccd502

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

Lib/test/test_email/test__header_value_parser.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,8 +1863,7 @@ def test_get_display_name_for_invalid_address_field(self):
18631863
self.assertEqual(display_name.value, '')
18641864

18651865
def test_get_display_name_comment_only(self):
1866-
# A display name consisting only of a comment (CFWS) used to raise an
1867-
# uncaught IndexError; it now degrades to an empty display name.
1866+
# gh-151857: a comment-only (CFWS) display name raised IndexError.
18681867
display_name = self._test_get_x(
18691868
parser.get_display_name,
18701869
'(c)', '(c)', ' "" ',
@@ -3155,25 +3154,22 @@ def mime_parameters_as_value(self,
31553154
[('r', '"')],
31563155
[errors.InvalidHeaderDefect]*2),
31573156

3158-
# gh-151857: A parameter name ending with the extended marker
3159-
# '*' but with no value used to raise an uncaught IndexError instead
3160-
# of degrading to a defect. Each case below IndexErrors unpatched.
3157+
# gh-151857: a parameter name ending in the extended marker '*' with
3158+
# no value used to raise an uncaught IndexError instead of a defect.
31613159
'extended_marker_no_value': (
31623160
'name*',
31633161
'',
31643162
'name*',
31653163
[],
31663164
[errors.InvalidHeaderDefect]),
31673165

3168-
# Sectioned form ('*0*') reaches the same marker-consuming branch.
31693166
'extended_marker_no_value_sectioned': (
31703167
'name*0*',
31713168
'',
31723169
'name*0*',
31733170
[],
31743171
[errors.InvalidHeaderDefect]),
31753172

3176-
# A trailing marker-only parameter after a valid one.
31773173
'extended_marker_no_value_after_param': (
31783174
'x=1; name*',
31793175
' x="1"',

Lib/test/test_email/test_headerregistry.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,8 +1427,7 @@ def test_groups_types(self):
14271427
self.assertIsInstance(h.groups[0], Group)
14281428

14291429
def test_comment_only_group_display_name(self):
1430-
# A group whose display name is only a comment used to raise an
1431-
# uncaught IndexError while parsing; it now degrades gracefully.
1430+
# gh-151857: a comment-only group display name raised IndexError.
14321431
h = self.make_header('to', '(c):')
14331432
self.assertEqual(h.groups[0].display_name, '')
14341433
self.assertEqual(h.addresses, ())

0 commit comments

Comments
 (0)