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'), ])
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'))