def test_concat(self): paths = [self.file1, self.file2] sep = ',' index = False header = False axis = 1 concat_csv._concat(self.outfile, paths, sep, index, header, axis) result = self.outfile.getvalue() benchmark = "ian,1,ian,11\n" + "daniel,2,daniel,22\n" self.assertEqual(result, benchmark)
def test_concat_header_index(self): paths = [self.file1, self.file2] sep = ',' index = True header = True axis = 1 concat_csv._concat(self.outfile, paths, sep, index, header, axis) result = self.outfile.getvalue() benchmark = "name,age,height\n" + "ian,1,11\n" + "daniel,2,22\n" self.assertEqual(result, benchmark)