Use more specific assertLess instead of assertTrue

PiperOrigin-RevId: 504670738
Change-Id: Ib68b676403204098e89f536f9b8317f9f717c24d
This commit is contained in:
Tom Hughes 2023-01-25 15:00:39 -08:00 committed by Copybara-Service
parent f47d75faf3
commit b495f72f1f

View File

@ -282,8 +282,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase):
time_delta = abs(datetime.datetime.now() - date_time_from_xml) time_delta = abs(datetime.datetime.now() - date_time_from_xml)
# timestamp value should be near the current local time # timestamp value should be near the current local time
self.assertTrue(time_delta < datetime.timedelta(seconds=600), self.assertLess(time_delta, datetime.timedelta(seconds=600))
'time_delta is %s' % time_delta)
actual.unlink() actual.unlink()
def testDefaultOutputFile(self): def testDefaultOutputFile(self):