Skip to content

Commit b495f72

Browse files
thughescopybara-github
authored andcommitted
Use more specific assertLess instead of assertTrue
PiperOrigin-RevId: 504670738 Change-Id: Ib68b676403204098e89f536f9b8317f9f717c24d
1 parent f47d75f commit b495f72

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

googletest/test/gtest_xml_output_unittest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,7 @@ def testTimestampValue(self):
282282

283283
time_delta = abs(datetime.datetime.now() - date_time_from_xml)
284284
# timestamp value should be near the current local time
285-
self.assertTrue(time_delta < datetime.timedelta(seconds=600),
286-
'time_delta is %s' % time_delta)
285+
self.assertLess(time_delta, datetime.timedelta(seconds=600))
287286
actual.unlink()
288287

289288
def testDefaultOutputFile(self):

0 commit comments

Comments
 (0)