We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ruff
1 parent e139a56 commit 5ec971dCopy full SHA for 5ec971d
tests/test_utils.py
@@ -3,7 +3,6 @@
3
from __future__ import annotations
4
5
import hashlib
6
-import os
7
import shutil
8
from pathlib import Path
9
from typing import TYPE_CHECKING, NoReturn
@@ -1056,7 +1055,7 @@ def test_download_unzip_data(tmp_path: Path) -> None:
1056
1055
1057
extracted_path = save_dir_path / "test_directory"
1058
# to avoid hidden files in case of MAC-OS or Windows (?)
1059
- extracted_dirs = [f for f in os.listdir(extracted_path) if not f.startswith(".")]
+ extracted_dirs = [f for f in Path.iterdir(extracted_path) if not f.startswith(".")]
1060
extracted_dirs.sort() # ensure same ordering
1061
assert extracted_dirs == ["dir1", "dir2", "dir3"]
1062
0 commit comments