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

Method check_htmlcalendar_encoding

Lib/test/test_calendar.py:419–429  ·  view source on GitHub ↗
(self, req, res)

Source from the content-addressed store, hash-verified

417 return lines
418
419 def check_htmlcalendar_encoding(self, req, res):
420 cal = calendar.HTMLCalendar()
421 format_ = default_format.copy()
422 format_["encoding"] = req or 'utf-8'
423 format_with_css = {**format_, "css_styles": result_2004_css}
424 formatted_html = result_2004_html.format(**format_with_css)
425 output = cal.formatyearpage(2004, encoding=req)
426 self.assertEqual(
427 output,
428 formatted_html.encode(res)
429 )
430
431 def test_output(self):
432 self.assertEqual(

Calls 5

formatyearpageMethod · 0.95
copyMethod · 0.45
formatMethod · 0.45
assertEqualMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected