Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
open.py12 linesDownload Raw Back to abstract
1import pytest2 3 4class AbstractOpenTests:5    def test_open_exclusive(self, fs, fs_target):6        with fs.open(fs_target, "wb") as f:7            f.write(b"data")8        with fs.open(fs_target, "rb") as f:9            assert f.read() == b"data"10        with pytest.raises(FileExistsError):11            fs.open(fs_target, "xb")12 
codekingpro/portable-devtools · Team Ai