Exemplo n.º 1
0
 def test_time_result_with_more_than_10_hours(self):
     """Test time result with more than 10 hours."""
     self.assertEqual(minutes_to_time(645), (10, 45))
Exemplo n.º 2
0
 def test_60_minutes_returns_exactly_one_hour(self):
     """Test that 60 minutes returns exactly one hour."""
     self.assertEqual(minutes_to_time(60), (1, 0))
Exemplo n.º 3
0
 def test_more_than_60_minutes_returns_more_than_one_hour(self):
     """Test that more than 60 minutes returns more than one hour."""
     self.assertEqual(minutes_to_time(65), (1, 5))
Exemplo n.º 4
0
 def test_zero_minutes_returns_0_0(self):
     """Test that zero minutes returns 00:00."""
     self.assertEqual(minutes_to_time(0), (0, 0))
Exemplo n.º 5
0
 def test_less_than_60_minutes_returns_less_than_one_hour(self):
     """Test that less than 60 minutes returns less than one hour."""
     self.assertEqual(minutes_to_time(50), (0, 50))
Exemplo n.º 6
0
 def test_non_number_string_returns_none(self):
     """Test that non number string returns None."""
     self.assertIsNone(minutes_to_time('a string'))
Exemplo n.º 7
0
 def test_int_int_string_returns_correct_value(self):
     """Test that int in string returns correct value."""
     self.assertEqual(minutes_to_time('50'), (0, 50))
Exemplo n.º 8
0
 def test_float_returns_correct_value(self):
     """Test that float returns correct value."""
     self.assertEqual(minutes_to_time(50.3), (0, 50))
Exemplo n.º 9
0
 def test_none_returns_none(self):
     """Test that None returns None."""
     self.assertIsNone(minutes_to_time(None))
Exemplo n.º 10
0
 def test_negative_returns_none(self):
     """Test that negative returns None."""
     self.assertIsNone(minutes_to_time(-1))