(self)
| 1177 | _PyTime_ObjectToTimeval(float('nan'), time_rnd) |
| 1178 | |
| 1179 | def test_object_to_timespec(self): |
| 1180 | from _testinternalcapi import _PyTime_ObjectToTimespec |
| 1181 | |
| 1182 | self.check_int_rounding(_PyTime_ObjectToTimespec, |
| 1183 | lambda secs: (secs, 0), |
| 1184 | value_filter=self.time_t_filter) |
| 1185 | |
| 1186 | self.check_float_rounding(_PyTime_ObjectToTimespec, |
| 1187 | self.create_converter(SEC_TO_NS), |
| 1188 | value_filter=self.time_t_filter) |
| 1189 | |
| 1190 | # test nan |
| 1191 | for time_rnd, _ in ROUNDING_MODES: |
| 1192 | with self.assertRaises(ValueError): |
| 1193 | _PyTime_ObjectToTimespec(float('nan'), time_rnd) |
| 1194 | |
| 1195 | @unittest.skipUnless(sys.platform == "darwin", "test weak linking on macOS") |
| 1196 | class TestTimeWeaklinking(unittest.TestCase): |
nothing calls this directly
no test coverage detected