def _create_fs(self, remote_filesystems): """Create the cuckoo drive fileystem out of the remote filesystems""" multifs = CuckooDriveFS.verbose_fs(WritableMultiFS(), "MultiFS", self.verbose) for idx, remote_fs in enumerate(remote_filesystems): multifs.addfs("Remote{0}".format(idx), remote_fs) return CuckooDriveFS.verbose_fs(PartedFS(multifs, self.file_size), "PartedFS", self.verbose)
class TestExternalPartedFS(unittest.TestCase, FSTestCases): def setUp(self): self.fs = PartedFS(MemoryFS(), kb(100)) def tearDown(self): self.fs.close() @mark.xfail(reason="Appending does not work yet") def test_readwriteappendseek(self): super(TestExternalPartedFS, self).test_readwriteappendseek() @mark.xfail(reason="FS is not truncatable") def test_truncate_to_larger_size(self): super(TestExternalPartedFS, self).test_truncate_to_larger_size() @mark.xfail(reason="FS is not truncatable") def test_truncate(self): super(TestExternalPartedFS, self).test_truncate()
def fs(self): return PartedFS(MemoryFS(), kb(4))
def setUp(self): self.fs = PartedFS(MemoryFS(), kb(100))