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

Method testParseUnicodeWords

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

parseFunction · 0.90
rus_parserinfoClass · 0.85

Tested by

no test coverage detected