From 799ebe18cac44a8d5a38b2c4af8f14c78de974d8 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 14 Mar 2021 16:10:59 +0100 Subject: [PATCH] Remove the get_phrase_cfws_only_raises test This test's name does not start with test_, which prevents it from running. Apparently it was accidentally added this way. None of the callers of get_phrase() assume it can raise exceptions, so simply dropping the test seems best. The fact that the phrase is invalid still gets recorded in defects. --- Lib/test/test_email/test__header_value_parser.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Lib/test/test_email/test__header_value_parser.py b/Lib/test/test_email/test__header_value_parser.py index 854f2ff009c618..03b42d724b1399 100644 --- a/Lib/test/test_email/test__header_value_parser.py +++ b/Lib/test/test_email/test__header_value_parser.py @@ -1031,10 +1031,6 @@ def test_get_phrase_ending_with_obsolete(self): self.assertEqual(len(phrase), 4) self.assertEqual(phrase[3].comments, ['with trailing comment']) - def get_phrase_cfws_only_raises(self): - with self.assertRaises(errors.HeaderParseError): - parser.get_phrase(' (foo) ') - # get_local_part def test_get_local_part_simple(self):