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


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


        
Exemplo n.º 6
0
 def test_repeat_count_zero(self):
     b = repeat('y', 0).to_list()
     self.assertEqual(b, [])