From b495f72f1f096135cf9cf8c7879b5b89250de50a Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 25 Jan 2023 15:00:39 -0800 Subject: [PATCH] Use more specific assertLess instead of assertTrue PiperOrigin-RevId: 504670738 Change-Id: Ib68b676403204098e89f536f9b8317f9f717c24d --- googletest/test/gtest_xml_output_unittest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/googletest/test/gtest_xml_output_unittest.py b/googletest/test/gtest_xml_output_unittest.py index 29fbc41f..d48d1af2 100755 --- a/googletest/test/gtest_xml_output_unittest.py +++ b/googletest/test/gtest_xml_output_unittest.py @@ -282,8 +282,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase): time_delta = abs(datetime.datetime.now() - date_time_from_xml) # timestamp value should be near the current local time - self.assertTrue(time_delta < datetime.timedelta(seconds=600), - 'time_delta is %s' % time_delta) + self.assertLess(time_delta, datetime.timedelta(seconds=600)) actual.unlink() def testDefaultOutputFile(self):