예제 #1
0
 def test_subdir(self):
     files = sorted(git_utils.walk_files('branch',
                                         os.path.join('dir', 'subdir')),
                    key=lambda x: x.path)
     self.assertEqual(files, [
         git_utils.FileInfo(os.path.join('dir', 'subdir', 'file 3.txt'),
                            b'even more text'),
     ])
예제 #2
0
 def test_nonexistent(self):
     with self.assertRaises(git_utils.GitError):
         list(git_utils.walk_files('branch', 'nonexist'))
     with self.assertRaises(git_utils.GitError):
         list(git_utils.walk_files('nonexist'))