Exemplo n.º 1
0
 def test_concat_filter(self):
     mass.concat(self.dir.name, '/*.txt', self.dir.name + '/output.txt',
                 fltr='^A{7}$')
     with open(self.dir.name + '/output.txt') as f:
         lines = f.readlines()
         self.assertEqual(len(lines), 5)
         for line in lines:
             self.assertRegex(line, 'A+\n')
Exemplo n.º 2
0
 def test_concat(self):
     """Concatenates all files into a new output file."""
     mass.concat(self.dir.name, '/*.txt', self.dir.name + '/output.txt')
     with open(self.dir.name + '/output.txt') as f:
         lines = f.readlines()
         self.assertEqual(len(lines), 10)
         for line in lines:
             self.assertRegex(line, 'A+\n')
Exemplo n.º 3
0
 def test_concat(self):
     """Concatenates all files into a new output file."""
     mass.concat(self.dir.name, '/*.txt', self.dir.name + '/output.txt')
     with open(self.dir.name + '/output.txt') as f:
         lines = f.readlines()
         self.assertEqual(len(lines), 10)
         for line in lines:
             self.assertRegex(line, 'A+\n')
Exemplo n.º 4
0
 def test_concat_filter(self):
     mass.concat(self.dir.name,
                 '/*.txt',
                 self.dir.name + '/output.txt',
                 fltr='^A{7}$')
     with open(self.dir.name + '/output.txt') as f:
         lines = f.readlines()
         self.assertEqual(len(lines), 5)
         for line in lines:
             self.assertRegex(line, 'A+\n')