Example #1
0
 def test_iter(self):
     print_lines(iter(['<line_1>', '<line_2>', '<line_3>']))
     self.assertEqual(self.stdout.getvalue(),
                      '<line_1>\n<line_2>\n<line_3>\n')
 def test_iter(self):
     print_lines(iter(['<line_1>', '<line_2>', '<line_3>']))
     self.assertEqual(self.stdout.getvalue(),
                      '<line_1>\n<line_2>\n<line_3>\n')
Example #3
0
 def test_empty(self):
     print_lines([])
     self.assertEqual(self.stdout.getvalue(), '')
 def test_empty(self):
     print_lines([])
     self.assertEqual(self.stdout.getvalue(), '')