]> granicus.if.org Git - python/commitdiff
Fix test_time on platform with 32-bit time_t type
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 10 Sep 2015 09:45:06 +0000 (11:45 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 10 Sep 2015 09:45:06 +0000 (11:45 +0200)
Filter also values for check_float_rounding().

Lib/test/test_time.py

index 891c99d009265eb7f5d43f76bc4649b4ea4ac961..30b01d5f4baf35f7f031dad85d24786b33dbc596 100644 (file)
@@ -918,7 +918,8 @@ class TestOldPyTime(CPyTimeTestCase, unittest.TestCase):
                                 value_filter=self.time_t_filter)
 
         self.check_float_rounding(pytime_object_to_time_t,
-                                  self.decimal_round)
+                                  self.decimal_round,
+                                  value_filter=self.time_t_filter)
 
     def create_converter(self, sec_to_unit):
         def converter(secs):
@@ -943,7 +944,8 @@ class TestOldPyTime(CPyTimeTestCase, unittest.TestCase):
                                 value_filter=self.time_t_filter)
 
         self.check_float_rounding(pytime_object_to_timeval,
-                                  self.create_converter(SEC_TO_US))
+                                  self.create_converter(SEC_TO_US),
+                                  value_filter=self.time_t_filter)
 
     def test_object_to_timespec(self):
         from _testcapi import pytime_object_to_timespec
@@ -953,7 +955,8 @@ class TestOldPyTime(CPyTimeTestCase, unittest.TestCase):
                                 value_filter=self.time_t_filter)
 
         self.check_float_rounding(pytime_object_to_timespec,
-                                  self.create_converter(SEC_TO_NS))
+                                  self.create_converter(SEC_TO_NS),
+                                  value_filter=self.time_t_filter)
 
 
 if __name__ == "__main__":