Skip to content

Commit 72f7c75

Browse files
Address review: remove LLM comments, use top-level import, drop redundant success test
1 parent 0a7bd9d commit 72f7c75

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Lib/test/test_email/test_email.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5790,18 +5790,10 @@ def test_should_not_hang_on_invalid_ew_messages(self):
57905790
msg = email.message_from_string(m)
57915791

57925792
def test_collapse_rfc2231_value_non_3_tuple(self):
5793-
# collapse_rfc2231_value raises TypeError on values that are
5794-
# neither a string nor a 3-tuple.
5795-
from email.utils import collapse_rfc2231_value
57965793
for val in [(), ('a',), ('a', 'b'), ('a', 'b', 'c', 'd'), 42, None]:
57975794
with self.subTest(val=val):
57985795
with self.assertRaises(TypeError):
5799-
collapse_rfc2231_value(val)
5800-
# A proper 3-tuple decodes correctly.
5801-
result = collapse_rfc2231_value(('us-ascii', 'en', 'hello'))
5802-
self.assertEqual(result, 'hello')
5803-
# A plain string passes through unquote.
5804-
self.assertEqual(collapse_rfc2231_value('"hello"'), 'hello')
5796+
email.utils.collapse_rfc2231_value(val)
58055797

58065798

58075799
# Tests to ensure that signed parts of an email are completely preserved, as

0 commit comments

Comments
 (0)