MCPcopy Index your code
hub / github.com/RustPython/RustPython / as_hours

Method as_hours

Lib/test/datetimetester.py:914–918  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

912 return T(td.days, td.seconds, td.microseconds)
913
914 def as_hours(self):
915 sum = (self.days * 24 +
916 self.seconds / 3600.0 +
917 self.microseconds / 3600e6)
918 return round(sum)
919
920 t1 = T(days=1)
921 self.assertIs(type(t1), T)

Callers 1

Calls 1

roundFunction · 0.85

Tested by

no test coverage detected