예제 #1
0
 def test_sequence_error1(self):
     try:
         sequence()
         self.fail("Expected ValueError")
     except ValueError:
         pass
     try:
         sequence(1,2,3,4)
         self.fail("Expected ValueError")
     except ValueError:
         pass
예제 #2
0
 def test_sequence(self):
     self.assertEqual(list(sequence(10)), list(range(1,11)))
     self.assertEqual(list(sequence(8,10)), [8,9,10])
     self.assertEqual(list(sequence(1,10,3)), [1,4,7,10])