codekingpro/portable-devtools
114k
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 