Skip to content

Commit b407f3c

Browse files
Unit test to cover current bug
1 parent 7c867d7 commit b407f3c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/test_clone_to_cache.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import git
1212

13-
from robot_descriptions._cache import clone_to_cache
13+
from robot_descriptions._cache import clone_to_cache, clear_cache
1414
from robot_descriptions._repositories import REPOSITORIES
1515

1616

@@ -64,3 +64,11 @@ def test_clone_valid_commit(self):
6464
commit = "0e488ee4708155a71b2a92d05305a9186b543593"
6565
repository_path = clone_to_cache(description_name, commit)
6666
self.assertTrue(repository_path.endswith(f"-{commit}"))
67+
68+
def test_clone_twice_with_commit(self):
69+
clear_cache()
70+
clone_to_cache(
71+
"upkie_description",
72+
commit="a2c820054a7572603875def478f21376165c125e",
73+
)
74+
clone_to_cache("draco3_description")

0 commit comments

Comments
 (0)