MCPcopy Index your code
hub / github.com/python/cpython / test_parser

Method test_parser

Lib/test/test_email/test_policy.py:368–371  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

366 # These are redundant, but we need them for black-box completeness.
367
368 def test_parser(self):
369 p = email.parser.Parser(policy=self.MyPolicy)
370 with self.assertRaisesRegex(TestException, "^test$"):
371 p.parsestr('Subject: test\n\n')
372
373 def test_bytes_parser(self):
374 p = email.parser.BytesParser(policy=self.MyPolicy)

Callers

nothing calls this directly

Calls 2

parsestrMethod · 0.95
assertRaisesRegexMethod · 0.80

Tested by

no test coverage detected