Commit afdac030 authored by Nadeem Vawda's avatar Nadeem Vawda

Use assertEqual in test_strptime for better failure messages (cf. issue #14113).

parent 9a2d99e2
......@@ -86,17 +86,14 @@ class LocaleTime_Tests(unittest.TestCase):
# output.
magic_date = (1999, 3, 17, 22, 44, 55, 2, 76, 0)
strftime_output = time.strftime("%c", magic_date)
self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_date_time,
magic_date),
"LC_date_time incorrect")
self.assertEqual(time.strftime(self.LT_ins.LC_date_time, magic_date),
strftime_output, "LC_date_time incorrect")
strftime_output = time.strftime("%x", magic_date)
self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_date,
magic_date),
"LC_date incorrect")
self.assertEqual(time.strftime(self.LT_ins.LC_date, magic_date),
strftime_output, "LC_date incorrect")
strftime_output = time.strftime("%X", magic_date)
self.assertTrue(strftime_output == time.strftime(self.LT_ins.LC_time,
magic_date),
"LC_time incorrect")
self.assertEqual(time.strftime(self.LT_ins.LC_time, magic_date),
strftime_output, "LC_time incorrect")
LT = _strptime.LocaleTime()
LT.am_pm = ('', '')
self.assertTrue(LT.LC_time, "LocaleTime's LC directives cannot handle "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment