MCPcopy Create free account
hub / github.com/dateutil/dateutil / testParseUnicodeWords

Method testParseUnicodeWords

tests/test_parser.py:423–441  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

421 assert parser().parse(self.str_str) == parser().parse(self.uni_str)
422
423 def testParseUnicodeWords(self):
424
425 class rus_parserinfo(parserinfo):
426 MONTHS = [("янв", "Январь"),
427 ("фев", "Февраль"),
428 ("мар", "Март"),
429 ("апр", "Апрель"),
430 ("май", "Май"),
431 ("июн", "Июнь"),
432 ("июл", "Июль"),
433 ("авг", "Август"),
434 ("сен", "Сентябрь"),
435 ("окт", "Октябрь"),
436 ("ноя", "Ноябрь"),
437 ("дек", "Декабрь")]
438
439 expected = datetime(2015, 9, 10, 10, 20)
440 res = parse('10 Сентябрь 2015 10:20', parserinfo=rus_parserinfo())
441 assert res == expected
442
443 def testParseWithNulls(self):
444 pstring = '\x00\x00August 29, 1924'

Callers

nothing calls this directly

Calls 2

parseFunction · 0.90
rus_parserinfoClass · 0.85

Tested by

no test coverage detected