MCPcopy Index your code
hub / github.com/RustPython/RustPython / normalize_calendar

Method normalize_calendar

Lib/test/test_calendar.py:371–381  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

369
370class OutputTestCase(unittest.TestCase):
371 def normalize_calendar(self, s):
372 # Filters out locale dependent strings
373 def neitherspacenordigit(c):
374 return not c.isspace() and not c.isdigit()
375
376 lines = []
377 for line in s.splitlines(keepends=False):
378 # Drop texts, as they are locale dependent
379 if line and not filter(neitherspacenordigit, line):
380 lines.append(line)
381 return lines
382
383 def check_htmlcalendar_encoding(self, req, res):
384 cal = calendar.HTMLCalendar()

Callers 1

test_outputMethod · 0.95

Calls 3

filterFunction · 0.85
splitlinesMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected