@@ -23,6 +23,24 @@ def test_download_huggingface_model(tmp_path_factory, model="full_cat"):
2323 # Verify that the Hugging Face folder was removed
2424 assert not any (f .startswith ("models--" ) for f in os .listdir (folder ))
2525
26+ def test_download_huggingface_superanimalmousemodel (tmp_path_factory , model = "superanimal_topviewmouse" ):
27+ folder = tmp_path_factory .mktemp ("temp" )
28+ dlclibrary .download_huggingface_model (model , str (folder ))
29+
30+ assert os .path .exists (folder / "pose_cfg.yaml" )
31+ assert any (f .startswith ("snapshot-" ) for f in os .listdir (folder ))
32+ # Verify that the Hugging Face folder was removed
33+ assert not any (f .startswith ("models--" ) for f in os .listdir (folder ))
34+
35+ def test_download_huggingface_superquadrupedmodel (tmp_path_factory , model = "superanimal_quadruped" ):
36+ folder = tmp_path_factory .mktemp ("temp" )
37+ dlclibrary .download_huggingface_model (model , str (folder ))
38+
39+ assert os .path .exists (folder / "pose_cfg.yaml" )
40+ assert any (f .startswith ("snapshot-" ) for f in os .listdir (folder ))
41+ # Verify that the Hugging Face folder was removed
42+ assert not any (f .startswith ("models--" ) for f in os .listdir (folder ))
43+
2644
2745def test_download_huggingface_wrong_model ():
2846 with pytest .raises (ValueError ):
@@ -38,4 +56,5 @@ def test_parse_superanimal_models():
3856@pytest .mark .skip
3957@pytest .mark .parametrize ("model" , MODELOPTIONS )
4058def test_download_all_models (tmp_path_factory , model ):
59+ print ("Downloading ..." , model )
4160 test_download_huggingface_model (tmp_path_factory , model )
0 commit comments