88from huggingface_hub .utils import SoftTemporaryDirectory , logging
99
1010from .testing_constants import ENDPOINT_STAGING , TOKEN
11- from .testing_utils import (
12- repo_name ,
13- with_production_testing ,
14- xfail_on_windows ,
15- )
11+ from .testing_utils import repo_name , skip_on_windows , with_production_testing
1612
1713
1814logger = logging .get_logger (__name__ )
@@ -28,7 +24,7 @@ def get_file_contents(path):
2824
2925@with_production_testing
3026class CacheFileLayoutHfHubDownload (unittest .TestCase ):
31- @xfail_on_windows (reason = "Symlinks are deactivated in Windows tests." )
27+ @skip_on_windows (reason = "Symlinks are deactivated in Windows tests." )
3228 def test_file_downloaded_in_cache (self ):
3329 for revision , expected_reference in (
3430 (None , "main" ),
@@ -130,7 +126,7 @@ def test_file_download_happens_once(self):
130126
131127 self .assertEqual (creation_time_0 , creation_time_1 )
132128
133- @xfail_on_windows (reason = "Symlinks are deactivated in Windows tests." )
129+ @skip_on_windows (reason = "Symlinks are deactivated in Windows tests." )
134130 def test_file_download_happens_once_intra_revision (self ):
135131 # Tests that a file is only downloaded once if it's not updated, even across different revisions.
136132
@@ -145,7 +141,7 @@ def test_file_download_happens_once_intra_revision(self):
145141
146142 self .assertEqual (creation_time_0 , creation_time_1 )
147143
148- @xfail_on_windows (reason = "Symlinks are deactivated in Windows tests." )
144+ @skip_on_windows (reason = "Symlinks are deactivated in Windows tests." )
149145 def test_multiple_refs_for_same_file (self ):
150146 with SoftTemporaryDirectory () as cache :
151147 hf_hub_download (MODEL_IDENTIFIER , "file_0.txt" , cache_dir = cache )
@@ -179,7 +175,7 @@ def test_multiple_refs_for_same_file(self):
179175
180176@with_production_testing
181177class CacheFileLayoutSnapshotDownload (unittest .TestCase ):
182- @xfail_on_windows (reason = "Symlinks are deactivated in Windows tests." )
178+ @skip_on_windows (reason = "Symlinks are deactivated in Windows tests." )
183179 def test_file_downloaded_in_cache (self ):
184180 with SoftTemporaryDirectory () as cache :
185181 snapshot_download (MODEL_IDENTIFIER , cache_dir = cache )
@@ -210,7 +206,7 @@ def test_file_downloaded_in_cache(self):
210206
211207 self .assertTrue (all ([os .path .isfile (link ) for link in resolved_snapshot_links ]))
212208
213- @xfail_on_windows (reason = "Symlinks are deactivated in Windows tests." )
209+ @skip_on_windows (reason = "Symlinks are deactivated in Windows tests." )
214210 def test_file_downloaded_in_cache_several_revisions (self ):
215211 with SoftTemporaryDirectory () as cache :
216212 snapshot_download (MODEL_IDENTIFIER , cache_dir = cache , revision = "file-3" )
0 commit comments