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

Method test_split_header_words

Lib/test/test_http_cookiejar.py:256–268  ·  view source on GitHub ↗
(self, arg, expect)

Source from the content-addressed store, hash-verified

254 [("spam", "")], [("foo", ',;"')], [("bar", "")]]),
255 ])
256 def test_split_header_words(self, arg, expect):
257 try:
258 result = split_header_words([arg])
259 except:
260 import traceback, io
261 f = io.StringIO()
262 traceback.print_exc(None, f)
263 result = "(error -- traceback follows)\n\n%s" % f.getvalue()
264 self.assertEqual(result, expect, """
265When parsing: '%s'
266Expected: '%s'
267Got: '%s'
268""" % (arg, expect, result))
269
270 @support.subTests('arg,expect', [
271 ("foo", "foo"),

Callers

nothing calls this directly

Calls 4

getvalueMethod · 0.95
split_header_wordsFunction · 0.90
print_excMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected