Skip to content

Commit 1235b59

Browse files
Add unit test for current bug
1 parent 137c70a commit 1235b59

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

tests/test_clone_to_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_clone_valid_commit(self):
6565
repository_path = clone_to_cache(description_name, commit)
6666
self.assertTrue(repository_path.endswith(f"-{commit}"))
6767

68-
def test_clone_twice_with_commit(self):
68+
def test_clone_with_commit_then_without(self):
6969
clear_cache()
7070
clone_to_cache(
7171
"upkie_description",

tests/test_loaders.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030

3131
class TestLoaders(unittest.TestCase):
32-
3332
"""
3433
Test loaders.
3534
"""
@@ -80,3 +79,17 @@ def test_idyntree(self):
8079
commit=self.upkie_description_commit,
8180
)
8281
)
82+
83+
def test_cache_path_package_name(self):
84+
"""Check a description with package:// URIs and a custom commit ID."""
85+
load_pinocchio(
86+
"draco3_description",
87+
commit="5afd19733d7b3e9f1135ba93e0aad90ed1a24cc7",
88+
)
89+
90+
def test_load_with_commit_then_without(self):
91+
load_pinocchio(
92+
"draco3_description",
93+
commit="5afd19733d7b3e9f1135ba93e0aad90ed1a24cc7",
94+
)
95+
load_pinocchio("baxter_description")

0 commit comments

Comments
 (0)