@@ -50,7 +50,7 @@ class TestValidCacheUtils(unittest.TestCase):
5050
5151 @with_production_testing
5252 def setUp (self ) -> None :
53- """Setup a clean cache for tests that will remain valid in all tests."""
53+ """Set up a clean cache for tests that will remain valid in all tests."""
5454 # Download latest main
5555 snapshot_download (repo_id = MODEL_ID , repo_type = "model" , cache_dir = self .cache_dir )
5656
@@ -71,7 +71,7 @@ def test_scan_cache_on_valid_cache_unix(self) -> None:
7171 """Scan the cache dir without warnings (on unix-based platform).
7272
7373 This test is duplicated and adapted for Windows in `test_scan_cache_on_valid_cache_windows`.
74- Note: Please make sure to updated both if any change is made.
74+ Note: Please make sure to update both if any change is made.
7575 """
7676 report = scan_cache_dir (self .cache_dir )
7777
@@ -104,7 +104,7 @@ def test_scan_cache_on_valid_cache_unix(self) -> None:
104104 self .assertEqual (sum (rev .nb_files for rev in repo_a .revisions ), 6 )
105105
106106 # 2 REFS in the repo: "main" and "refs/pr/1"
107- # We could have add a tag as well
107+ # We could have added a tag as well
108108 self .assertEqual (set (repo_a .refs .keys ()), {"main" , REF_1_NAME })
109109 self .assertEqual (repo_a .refs ["main" ].commit_hash , REPO_A_MAIN_HASH )
110110 self .assertEqual (repo_a .refs [REF_1_NAME ].commit_hash , REPO_A_PR_1_HASH )
@@ -139,7 +139,7 @@ def test_scan_cache_on_valid_cache_unix(self) -> None:
139139 pr_1_readme_file = [file for file in pr_1_revision .files if file .file_name == "README.md" ][0 ]
140140 pr_1_readme_file_path = pr_1_revision_path / "README.md"
141141
142- # file_path in "refs/pr/1" revision is different than "main" but same blob path
142+ # file_path in "refs/pr/1" revision is different from "main" but same blob path
143143 self .assertEqual (pr_1_readme_file .file_path , pr_1_readme_file_path ) # different
144144 self .assertEqual (pr_1_readme_file .blob_path , main_readme_blob_path ) # same
145145
@@ -150,7 +150,7 @@ def test_scan_cache_on_valid_cache_windows(self) -> None:
150150 Windows tests do not use symlinks which leads to duplication in the cache.
151151 This test is duplicated from `test_scan_cache_on_valid_cache_unix` with a few
152152 tweaks specific to windows.
153- Note: Please make sure to updated both if any change is made.
153+ Note: Please make sure to update both if any change is made.
154154 """
155155 report = scan_cache_dir (self .cache_dir )
156156
@@ -183,7 +183,7 @@ def test_scan_cache_on_valid_cache_windows(self) -> None:
183183 self .assertEqual (sum (rev .nb_files for rev in repo_a .revisions ), 6 )
184184
185185 # 2 REFS in the repo: "main" and "refs/pr/1"
186- # We could have add a tag as well
186+ # We could have added a tag as well
187187 REF_1_NAME = "refs\\ pr\\ 1" # Windows-specific
188188 self .assertEqual (set (repo_a .refs .keys ()), {"main" , REF_1_NAME })
189189 self .assertEqual (repo_a .refs ["main" ].commit_hash , REPO_A_MAIN_HASH )
@@ -220,7 +220,7 @@ def test_scan_cache_on_valid_cache_windows(self) -> None:
220220 pr_1_readme_file = [file for file in pr_1_revision .files if file .file_name == "README.md" ][0 ]
221221 pr_1_readme_file_path = pr_1_revision_path / "README.md"
222222
223- # file_path in "refs/pr/1" revision is different than "main"
223+ # file_path in "refs/pr/1" revision is different from "main"
224224 # Windows-specific: even blob path is different
225225 self .assertEqual (pr_1_readme_file .file_path , pr_1_readme_file_path )
226226 self .assertNotEqual ( # Windows-specific: different as well
@@ -237,7 +237,7 @@ class TestCorruptedCacheUtils(unittest.TestCase):
237237
238238 @with_production_testing
239239 def setUp (self ) -> None :
240- """Setup a clean cache for tests that will get corrupted/modified in tests."""
240+ """Set up a clean cache for tests that will get corrupted/modified in tests."""
241241 # Download latest main
242242 snapshot_download (repo_id = MODEL_ID , repo_type = "model" , cache_dir = self .cache_dir )
243243
@@ -676,7 +676,7 @@ def test_delete_path_on_folder_success(self) -> None:
676676 self .assertFalse (file_path_2 .exists ())
677677
678678 def test_delete_path_on_missing_file (self ) -> None :
679- """Try delete a missing file."""
679+ """Try to delete a missing file."""
680680 file_path = self .cache_dir / "file.txt"
681681
682682 with self .assertLogs () as captured :
@@ -687,7 +687,7 @@ def test_delete_path_on_missing_file(self) -> None:
687687 assert any (f"Couldn't delete TYPE: file not found ({ file_path } )" in log for log in captured .output )
688688
689689 def test_delete_path_on_missing_folder (self ) -> None :
690- """Try delete a missing folder."""
690+ """Try to delete a missing folder."""
691691 dir_path = self .cache_dir / "folder"
692692
693693 with self .assertLogs () as captured :
@@ -699,7 +699,7 @@ def test_delete_path_on_missing_folder(self) -> None:
699699
700700 @xfail_on_windows (reason = "Permissions are handled differently on Windows." )
701701 def test_delete_path_on_local_folder_with_wrong_permission (self ) -> None :
702- """Try delete a local folder that is protected."""
702+ """Try to delete a local folder that is protected."""
703703 dir_path = self .cache_dir / "something"
704704 dir_path .mkdir ()
705705 file_path_1 = dir_path / "file.txt" # file at root
0 commit comments