Пример #1
0
def test_copy_nested():
    fs = MockFilesystem(["file_1", {"test_path": ["file_1"]}])
    with pytest.raises(CopyError) as e:
        fs.copy(Path("/file_1"), Path("/test_path"))
    assert "destination already exists" in str(e)
Пример #2
0
def test_copy():
    fs = MockFilesystem({"file_1", "test_path"})
    with pytest.raises(CopyError) as e:
        fs.copy(Path("/file_1"), Path("/test_path"))
    assert "destination is a file" in str(e)