kyu_5.human_readable_time package
Submodules
kyu_5.human_readable_time.make_readable module
Solution for -> Human Readable Time.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- kyu_5.human_readable_time.make_readable.make_readable(seconds: int) str[source]
make_readable function.
The function takes a non-negative integer (seconds) as input and returns the time in a human-readable format (HH:MM:SS)
HH = hours, padded to 2 digits, range: 00 - 99 MM = minutes, padded to 2 digits, range: 00 - 59 SS = seconds, padded to 2 digits, range: 00 - 59
The maximum time never exceeds 359999 (99:59:59) :param seconds: :return:
kyu_5.human_readable_time.test_make_readable module
Test for -> Human Readable Time.
Created by Egor Kostan. GitHub: https://github.com/ikostan
- class kyu_5.human_readable_time.test_make_readable.MakeReadableTestCase(methodName='runTest')[source]
Bases:
TestCaseTesting make_readable function.
- _classSetupFailed = False
- _class_cleanups = []
- test_make_readable = None
- test_make_readable_0(**kw)
Testing make_readable function [with seconds=0, expected=’00:00:00’].
Write a function, which takes a non-negative integer (seconds) as input and returns the time in a human-readable format (HH:MM:SS)
HH = hours, padded to 2 digits, range: 00 - 99 MM = minutes, padded to 2 digits, range: 00 - 59 SS = seconds, padded to 2 digits, range: 00 - 59
The maximum time never exceeds 359999 (99:59:59) :return:
- test_make_readable_1(**kw)
Testing make_readable function [with seconds=5, expected=’00:00:05’].
Write a function, which takes a non-negative integer (seconds) as input and returns the time in a human-readable format (HH:MM:SS)
HH = hours, padded to 2 digits, range: 00 - 99 MM = minutes, padded to 2 digits, range: 00 - 59 SS = seconds, padded to 2 digits, range: 00 - 59
The maximum time never exceeds 359999 (99:59:59) :return:
- test_make_readable_2(**kw)
Testing make_readable function [with seconds=60, expected=’00:01:00’].
Write a function, which takes a non-negative integer (seconds) as input and returns the time in a human-readable format (HH:MM:SS)
HH = hours, padded to 2 digits, range: 00 - 99 MM = minutes, padded to 2 digits, range: 00 - 59 SS = seconds, padded to 2 digits, range: 00 - 59
The maximum time never exceeds 359999 (99:59:59) :return:
- test_make_readable_3(**kw)
Testing make_readable function [with seconds=86399, expected=’23:59:59’].
Write a function, which takes a non-negative integer (seconds) as input and returns the time in a human-readable format (HH:MM:SS)
HH = hours, padded to 2 digits, range: 00 - 99 MM = minutes, padded to 2 digits, range: 00 - 59 SS = seconds, padded to 2 digits, range: 00 - 59
The maximum time never exceeds 359999 (99:59:59) :return:
- test_make_readable_4(**kw)
Testing make_readable function [with seconds=359999, expected=’99:59:59’].
Write a function, which takes a non-negative integer (seconds) as input and returns the time in a human-readable format (HH:MM:SS)
HH = hours, padded to 2 digits, range: 00 - 99 MM = minutes, padded to 2 digits, range: 00 - 59 SS = seconds, padded to 2 digits, range: 00 - 59
The maximum time never exceeds 359999 (99:59:59) :return:
Module contents
Human Readable Time.