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)
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)