From ca75913e447f37656ca516b235d27d8cf054e9f0 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Mon, 28 Sep 2020 18:33:22 +0300 Subject: Implement seconds_to_minutes() --- iss/tests/test_utils.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'iss/tests/test_utils.py') diff --git a/iss/tests/test_utils.py b/iss/tests/test_utils.py index 4c67322..ee4971f 100644 --- a/iss/tests/test_utils.py +++ b/iss/tests/test_utils.py @@ -1,4 +1,17 @@ -from ..utils import deg_to_cardinal +from ..utils import deg_to_cardinal, seconds_to_minutes + + +def test_seconds_to_minutes(): + cases = [ + (0, "0:00"), + (1, "0:01"), + (60, "1:00"), + (61, "1:01"), + (1439, "23:59"), + (1440, "24:00"), + ] + for secs, s in cases: + assert seconds_to_minutes(secs) == s def test_deg_to_cardinal(): -- cgit v1.3.1