Skip to content

Commit 82a58ee

Browse files
committed
don't test "fork" on windows
1 parent 991443e commit 82a58ee

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_hf_file_system.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -669,10 +669,11 @@ def test_cache():
669669
assert dircache == fs.dircache
670670
assert another_dircache != fs.dircache
671671

672-
with multiprocessing.get_context("fork").Pool() as pool:
673-
(fs_token, dircache), (_, another_dircache) = pool.map(_get_fs_token_and_dircache, [fs, another_fs])
674-
assert dircache == fs.dircache
675-
assert another_dircache != fs.dircache
672+
if os.name != "nt": # "fork" is unavailable on windows
673+
with multiprocessing.get_context("fork").Pool() as pool:
674+
(fs_token, dircache), (_, another_dircache) = pool.map(_get_fs_token_and_dircache, [fs, another_fs])
675+
assert dircache == fs.dircache
676+
assert another_dircache != fs.dircache
676677

677678
with multiprocessing.pool.ThreadPool() as pool:
678679
(fs_token, dircache), (_, another_dircache) = pool.map(_get_fs_token_and_dircache, [fs, another_fs])

0 commit comments

Comments
 (0)