Skip to content

Commit 438f5a7

Browse files
committed
Always skip saver to avoid creating files
1 parent 7d9e315 commit 438f5a7

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

docs/source/conf.py

-3
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,9 @@
6262
doctest_test_doctest_blocks = ""
6363

6464
doctest_global_setup = """
65-
import os
6665
import torch
6766
from torchdata.datapipes.iter import IterableWrapper, FileLister, FileOpener
6867
69-
seperator_is_slash = os.sep == "/"
70-
7168
io_doctest = True
7269
7370
try:

torchdata/datapipes/iter/util/saver.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class SaverIterDataPipe(IterDataPipe[str]):
2929
Example:
3030
3131
.. testcode::
32-
:skipif: not seperator_is_slash
32+
:skipif: io_doctest
3333
3434
import os
3535
@@ -42,7 +42,7 @@ def filepath_fn(name: str) -> str:
4242
print(list(saver_dp))
4343
4444
.. testoutput::
45-
:skipif: not seperator_is_slash
45+
:skipif: io_doctest
4646
4747
['./1.txt', './2.txt', './3.txt']
4848

0 commit comments

Comments
 (0)