(self)
| 1161 | return converter |
| 1162 | |
| 1163 | def test_object_to_timeval(self): |
| 1164 | from _testinternalcapi import _PyTime_ObjectToTimeval |
| 1165 | |
| 1166 | self.check_int_rounding(_PyTime_ObjectToTimeval, |
| 1167 | lambda secs: (secs, 0), |
| 1168 | value_filter=self.time_t_filter) |
| 1169 | |
| 1170 | self.check_float_rounding(_PyTime_ObjectToTimeval, |
| 1171 | self.create_converter(SEC_TO_US), |
| 1172 | value_filter=self.time_t_filter) |
| 1173 | |
| 1174 | # test nan |
| 1175 | for time_rnd, _ in ROUNDING_MODES: |
| 1176 | with self.assertRaises(ValueError): |
| 1177 | _PyTime_ObjectToTimeval(float('nan'), time_rnd) |
| 1178 | |
| 1179 | def test_object_to_timespec(self): |
| 1180 | from _testinternalcapi import _PyTime_ObjectToTimespec |
nothing calls this directly
no test coverage detected