def test_python_datetime_pretty_print(self):
# datetime corresponding to Gregorian ordinal
d = date.fromordinal(736132)
# Verify, that if 'lang' is 'de' format of date is 'month. year'
self.assertEqual(lib.python_datetime_pretty_print(ts=d, lang='de'), 'Jun. 2016')
# Verify, that if 'lang' is not 'de' format of date is 'day. month.'
self.assertEqual(lib.python_datetime_pretty_print(ts=d, lang='en'), '17. Jun.')
self.assertEqual(lib.python_datetime_pretty_print(ts='2016-01-01', lang=''), '01. Jan.')
评论列表
文章目录