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

Method decimal_round

Lib/test/test_time.py:968–971  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

966 True, unit_to_sec, value_filter)
967
968 def decimal_round(self, x):
969 d = decimal.Decimal(x)
970 d = d.quantize(1)
971 return int(d)
972
973
974class TestCPyTime(CPyTimeTestCase, unittest.TestCase):

Callers 4

converterMethod · 0.80
test_AsTimeval_clampMethod · 0.80
converterMethod · 0.80

Calls 1

quantizeMethod · 0.95

Tested by

no test coverage detected