mirror of
https://github.com/Ladebeze66/projetcbaollm.git
synced 2025-12-18 06:47:51 +01:00
12 lines
329 B
Python
12 lines
329 B
Python
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")
|