Exemplo n.º 1
0
 def test_empty(self):
     self.assertTrue(is_counting_down([]))
Exemplo n.º 2
0
 def test_one_number(self):
     self.assertTrue(is_counting_down([1]))
Exemplo n.º 3
0
 def test_skipping_numbers(self):
     self.assertFalse(is_counting_down([4, 3, 1]))
Exemplo n.º 4
0
 def test_repeating_numbers(self):
     self.assertFalse(is_counting_down([4, 3, 2, 2, 1]))
Exemplo n.º 5
0
 def test_lazy_strict_sequence(self):
     self.assertTrue(is_counting_down(reversed(xrange(10))))
Exemplo n.º 6
0
 def test_strict_sequence(self):
     self.assertTrue(is_counting_down([5, 4, 3, 2, 1]))