(self)
| 995 | _PyTime_FromSeconds(float('nan')) |
| 996 | |
| 997 | def test_FromSecondsObject(self): |
| 998 | from _testinternalcapi import _PyTime_FromSecondsObject |
| 999 | |
| 1000 | self.check_int_rounding( |
| 1001 | _PyTime_FromSecondsObject, |
| 1002 | lambda secs: secs * SEC_TO_NS) |
| 1003 | |
| 1004 | self.check_float_rounding( |
| 1005 | _PyTime_FromSecondsObject, |
| 1006 | lambda ns: self.decimal_round(ns * SEC_TO_NS)) |
| 1007 | |
| 1008 | # test nan |
| 1009 | for time_rnd, _ in ROUNDING_MODES: |
| 1010 | with self.assertRaises(ValueError): |
| 1011 | _PyTime_FromSecondsObject(float('nan'), time_rnd) |
| 1012 | |
| 1013 | def test_AsSecondsDouble(self): |
| 1014 | from _testcapi import PyTime_AsSecondsDouble |
nothing calls this directly
no test coverage detected