Skip to content

Commit f543001

Browse files
Check that cloning to cache gets the right commit
1 parent faf1284 commit f543001

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_cache.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ def test_clone_to_cache_not_found(self):
7878
with self.assertRaises(ImportError):
7979
clone_to_cache("foo")
8080

81+
def test_clone_to_cache_right_commit(self):
82+
"""
83+
Check that clone_to_cache clones the repository at the right commit.
84+
"""
85+
description_name = "simple_humanoid_description"
86+
repo = git.Repo(clone_to_cache(description_name))
87+
commit = str(list(repo.iter_commits(max_count=1))[0])
88+
self.assertEqual(commit, REPOSITORIES[description_name].commit)
89+
8190
def test_cache_creation(self):
8291
"""
8392
Check that clone_to_cache creates directory if needed.

0 commit comments

Comments
 (0)