MCPcopy Index your code
hub / github.com/python/cpython / test_AsTimespec

Method test_AsTimespec

Lib/test/test_time.py:1060–1069  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1058 @unittest.skipUnless(hasattr(_testinternalcapi, '_PyTime_AsTimespec'),
1059 'need _testinternalcapi._PyTime_AsTimespec')
1060 def test_AsTimespec(self):
1061 from _testinternalcapi import _PyTime_AsTimespec
1062
1063 def timespec_converter(ns):
1064 return divmod(ns, SEC_TO_NS)
1065
1066 self.check_int_rounding(lambda ns, rnd: _PyTime_AsTimespec(ns),
1067 timespec_converter,
1068 NS_TO_SEC,
1069 value_filter=self.time_t_filter)
1070
1071 @unittest.skipUnless(hasattr(_testinternalcapi, '_PyTime_AsTimeval_clamp'),
1072 'need _testinternalcapi._PyTime_AsTimeval_clamp')

Callers

nothing calls this directly

Calls 1

check_int_roundingMethod · 0.80

Tested by

no test coverage detected