Download .venv/lib/python3.12/site-packages/fsspec/tests/abstract/pipe.py from FaustDerLegende/split: direct link, hf CLI and curl.
- Browser
- Download file 402 Bytes
-
https://huggingface.co/datasets/FaustDerLegende/split/resolve/main/.venv/lib/python3.12/site-packages/fsspec/tests/abstract/pipe.py
- Command line
-
hf download hf://datasets/FaustDerLegende/split/.venv/lib/python3.12/site-packages/fsspec/tests/abstract/pipe.py
-
curl -L -o pipe.py https://huggingface.co/datasets/FaustDerLegende/split/resolve/main/.venv/lib/python3.12/site-packages/fsspec/tests/abstract/pipe.py
402 Bytes
| import pytest | |
| class AbstractPipeTests: | |
| def test_pipe_exclusive(self, fs, fs_target): | |
| fs.pipe_file(fs_target, b"data") | |
| assert fs.cat_file(fs_target) == b"data" | |
| with pytest.raises(FileExistsError): | |
| fs.pipe_file(fs_target, b"data", mode="create") | |
| fs.pipe_file(fs_target, b"new data", mode="overwrite") | |
| assert fs.cat_file(fs_target) == b"new data" | |