diff options
Diffstat (limited to '.venv/lib/python3.12/site-packages/fsspec/tests/abstract/open.py')
-rw-r--r-- | .venv/lib/python3.12/site-packages/fsspec/tests/abstract/open.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/fsspec/tests/abstract/open.py b/.venv/lib/python3.12/site-packages/fsspec/tests/abstract/open.py new file mode 100644 index 00000000..bb75ea85 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/fsspec/tests/abstract/open.py @@ -0,0 +1,11 @@ +import pytest + + +class AbstractOpenTests: + def test_open_exclusive(self, fs, fs_target): + with fs.open(fs_target, "wb") as f: + f.write(b"data") + with fs.open(fs_target, "rb") as f: + assert f.read() == b"data" + with pytest.raises(FileExistsError): + fs.open(fs_target, "xb") |