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