Beispiel #1
0
 def test_repeat(self):
     b = repeat('x', 3).to_list()
     self.assertEqual(b, ['x', 'x', 'x'])
Beispiel #2
0
    def test_repeat_negative_count(self):
        self.assertRaises(ValueError, lambda: repeat(0, -1))


        
Beispiel #3
0
 def test_repeat_count_zero(self):
     b = repeat('y', 0).to_list()
     self.assertEqual(b, [])
Beispiel #4
0
 def test_repeat(self):
     b = repeat('x', 3).to_list()
     self.assertEqual(b, ['x', 'x', 'x'])
Beispiel #5
0
    def test_repeat_negative_count(self):
        self.assertRaises(ValueError, lambda: repeat(0, -1))


        
Beispiel #6
0
 def test_repeat_count_zero(self):
     b = repeat('y', 0).to_list()
     self.assertEqual(b, [])