Home
last modified time | relevance | path

Searched refs:defects (Results 1 - 15 of 15) sorted by relevance

/third_party/python/Lib/test/test_email/
H A Dtest__encoded_words.py10 result, defects = _ew.decode_q(source)
12 self.assertDefectsEqual(defects, ex_defects)
28 result, defects = _ew.decode_b(source)
30 self.assertDefectsEqual(defects, ex_defects)
64 def _test(self, source, result, charset='us-ascii', lang='', defects=[]):
69 self.assertDefectsEqual(d, defects)
90 defects = [errors.UndecodableBytesDefect])
96 defects = [
103 defects = [errors.InvalidBase64CharactersDefect])
108 defects
[all...]
H A Dtest_headerregistry.py107 self._test_attr_ro('defects')
111 self.assertEqual(len(h.defects), 0)
112 self.assertIsInstance(h.defects, tuple)
113 # Make sure it is still true when there are defects.
115 self.assertEqual(len(h.defects), 1)
116 self.assertIsInstance(h.defects, tuple)
125 # self.assertDefectsEqual(h.defects, [errors.ObsoleteHeaderDefect])
136 defects = args[0] if l>0 else []
141 self.assertDefectsEqual(h.defects, defects)
[all...]
H A Dtest_policy.py153 self.defects = []
158 self.assertEqual(obj.defects, [defect])
161 self.assertEqual(obj.defects, [defect, defect2])
165 self.defects = []
180 self.assertEqual(foo.defects, [defect1])
183 self.assertEqual(foo.defects, [defect1, defect2])
186 defects = None variable in PolicyAPITests.MyPolicy
188 super().__init__(*args, defects=[], **kw)
190 self.defects.append(defect)
203 self.assertEqual(my_policy.defects, [defect
[all...]
H A Dtest__header_value_parser.py22 def _assert_results(self, tl, rest, string, value, defects, remainder,
26 self.assertDefectsEqual(tl.all_defects, defects)
31 def _test_get_x(self, method, source, string, value, defects,
34 self._assert_results(tl, rest, string, value, defects, remainder,
38 def _test_parse_x(self, method, input, string, value, defects,
41 self._assert_results(tl, '', string, value, defects, '', comments)
464 self.assertEqual(ptext.defects[0].non_printables[0], '\x00')
504 self.assertEqual(ptext.defects[0].non_printables[0], '\x00')
534 self.assertEqual(atext.defects[0].non_printables[0], '\x00')
1244 self.assertEqual(dtext.defects[
[all...]
H A Dtest_email.py651 self.assertIsInstance(msg.defects[0],
2180 self.assertTrue(hasattr(inner, 'defects'))
2181 self.assertEqual(len(inner.defects), 1)
2182 self.assertIsInstance(inner.defects[0],
2189 self.assertEqual(len(msg.defects), 2)
2190 self.assertIsInstance(msg.defects[0],
2192 self.assertIsInstance(msg.defects[1],
2222 self.assertEqual(len(msg.defects), 1)
2223 self.assertIsInstance(msg.defects[0],
2229 self.assertEqual(len(msg.defects),
[all...]
H A Dtest_defect_handling.py60 self.assertTrue(hasattr(inner, 'defects'))
154 self.assertTrue(hasattr(msg, 'defects'))
307 return obj.defects
H A Dtest_contentmanager.py725 print(m['To'].defects)
735 print(m['To'].defects)
/third_party/python/Lib/email/
H A D_header_value_parser.py14 Where possible deviations from the standard are annotated on the 'defects'
54 All TokenList and Terminal objects have a 'defects' attribute which is a
55 possibly empty list all of the defects found while creating the token. Defects
56 may appear on any token in the tree, and a composite list of all defects in the
58 Terminal notes x.defects == x.all_defects.)
123 self.defects = []
138 return sum((x.all_defects for x in self), self.defects)
175 if self.defects:
176 extra = ' Defects: {}'.format(self.defects)
581 if self.defects
[all...]
H A D_encoded_words.py23 # as its argument, and returns a tuple (cte_decoded_string, defects). The
25 # specified cte. 'defects' is a list of MessageDefect instances indicating any
153 """Decode encoded word and return (string, charset, lang, defects) tuple.
166 character set, a defect is added to the defects list and the unknown octets
178 bstring, defects = _cte_decoders[cte](bstring)
183 defects.append(errors.UndecodableBytesDefect("Encoded word "
189 defects.append(errors.CharsetError(f"Unknown charset {charset!r} "
191 return string, charset, lang, defects
H A Dheaderregistry.py164 contain one key, 'defects', initialized to an empty list. After the call
171 The defects key is intended to collect parsing defects, which the message
174 list instead. The standard header parsers register defects for RFC
191 kwds = {'defects': []}
200 def init(self, name, *, parse_tree, defects):
203 self._defects = defects
210 def defects(self): member in BaseHeader
295 kwds['defects'].append(errors.HeaderMissingRequiredValue())
305 kwds['defects']
[all...]
H A Dcontentmanager.py106 if header.defects:
107 raise header.defects[0]
H A Dfeedparser.py19 object's .defects attribute.
192 # Look for final set of defects
511 self._cur.defects.append(defect)
523 self._cur.defects.append(defect)
H A Dmessage.py158 self.defects = []
316 value, defects = decode_b(b''.join(bpayload.splitlines()))
317 for defect in defects:
H A D_policybase.py133 raise_on_defect -- If true, then defects should be raised as errors.
180 This method is intended to be called by parsers that discover defects.
194 the defects attribute of obj. The objects used by the email package by
195 default that get passed to this method will always have a defects
199 obj.defects.append(defect)
/third_party/ltp/scripts/
H A Dcheckpatch.pl5826 "Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defects\n" . "$herectx");
6633 "Using weak declarations can have unintended link defects\n" . $herecurr);
7472 # If there were any defects found and not already fixing them
7476 NOTE: For some of the reported defects, checkpatch may be able to

Completed in 37 milliseconds