Add unit test for method create_tree() from Index class
This commit is contained in:
@@ -88,6 +88,13 @@ class IndexTest(utils.RepoTestCase):
|
||||
index.read()
|
||||
self.assertTrue('bye.txt' in index)
|
||||
|
||||
def test_create_tree(self):
|
||||
sha = 'fd937514cb799514d4b81bb24c5fcfeb6472b245'
|
||||
index = self.repo.index
|
||||
index.read()
|
||||
tree = index.create_tree()
|
||||
self.assertEqual(sha, tree.sha)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Reference in New Issue
Block a user