def test_parse_file(self): file = parse_file('file.pdf:/path/to/file.pdf:pdf') self.assertEqual(file, ['/path/to/file.pdf']) file = parse_file(':/path/to/file.pdf:pdf') self.assertEqual(file, ['/path/to/file.pdf']) file = parse_file('/path/to/file.pdf:pdf') self.assertEqual(file, ['/path/to/file.pdf']) file = parse_file('/path/to/file.pdf') self.assertEqual(file, ['/path/to/file.pdf']) file = parse_file(':/path/to/file.pdf:') self.assertEqual(file, ['/path/to/file.pdf'])
def test_parse_files(self): files = parse_file(':/path/to/file1.pdf:pdf;:/path/to/file2.pdf:pdf') self.assertEqual(files, ['/path/to/file1.pdf', '/path/to/file2.pdf'])