mirror of https://github.com/python/cpython
Use assertEqual in test_strptime for better failure messages (cf. issue #14113).
This commit is contained in:
parent
9a2d99e28a
commit
afdac030e3
|
@ -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 "
|
||||
|
|
Loading…
Reference in New Issue