summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2012-02-25 13:58:36 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2012-02-25 13:58:36 (GMT)
commitafdac030e3456463a9684a440359668aaea962ef (patch)
treec53cca24bb9c545da218e3944d5f6e6d1cff3b51 /Lib
parent9a2d99e28a5c2989b2db4023acae4f550885f2ef (diff)
downloadcpython-afdac030e3456463a9684a440359668aaea962ef.zip
cpython-afdac030e3456463a9684a440359668aaea962ef.tar.gz
cpython-afdac030e3456463a9684a440359668aaea962ef.tar.bz2
Use assertEqual in test_strptime for better failure messages (cf. issue #14113).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_strptime.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/Lib/test/test_strptime.py b/Lib/test/test_strptime.py
index 89c08ed..5332f2b 100644
--- a/Lib/test/test_strptime.py
+++ b/Lib/test/test_strptime.py
@@ -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 "