Пример #1
0
def test_move():
    fs = MemoryFileSystem()
    with fs.open("/myfile", "wb") as f:
        f.write(b"I had a nice big cabbage")
    fs.move("/myfile", "/otherfile")
    assert not fs.exists("/myfile")
    assert fs.info("/otherfile")
    assert isinstance(fs.ukey("/otherfile"), str)
Пример #2
0
def test_move():
    fs = MemoryFileSystem()
    with fs.open('/myfile', 'wb') as f:
        f.write(b'I had a nice big cabbage')
    fs.move('/myfile', '/otherfile')
    assert not fs.exists('/myfile')
    assert fs.info('/otherfile')
    assert isinstance(fs.ukey('/otherfile'), str)