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

Method test_bytes_parser

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

Source from the content-addressed store, hash-verified

371 p.parsestr('Subject: test\n\n')
372
373 def test_bytes_parser(self):
374 p = email.parser.BytesParser(policy=self.MyPolicy)
375 with self.assertRaisesRegex(TestException, "^test$"):
376 p.parsebytes(b'Subject: test\n\n')
377
378 # Now that we've established that all the parse methods get the
379 # policy in to feedparser, we can use message_from_string for

Callers

nothing calls this directly

Calls 2

parsebytesMethod · 0.95
assertRaisesRegexMethod · 0.80

Tested by

no test coverage detected