class TestExternalCuckooDriveFS(unittest.TestCase, FSTestCases):
    def setUp(self):
        fs1 = LimitSizeFS(MemoryFS(), mb(300))
        fs2 = LimitSizeFS(MemoryFS(), mb(300))
        self.fs = CuckooDriveFS([fs1, fs2])

    def tearDown(self):
        self.fs.close()

    @mark.xfail(reason="Appending does not work yet")
    def test_readwriteappendseek(self):
        super(TestExternalCuckooDriveFS, self).test_readwriteappendseek()

    @mark.xfail(reason="FS is not truncatable")
    def test_truncate_to_larger_size(self):
        super(TestExternalCuckooDriveFS, self).test_truncate_to_larger_size()

    @mark.xfail(reason="FS is not truncatable")
    def test_truncate(self):
        super(TestExternalCuckooDriveFS, self).test_truncate()
 def filesystems(self):
     userfs = TempFS()
     fs1 = LimitSizeFS(MemoryFS(), mb(300))
     fs2 = LimitSizeFS(MemoryFS(), mb(300))
     remotefs = CuckooDriveFS(remote_filesystems=[fs1, fs2])
     return (userfs, remotefs)
 def fs(self, request):
     fs1 = LimitSizeFS(MemoryFS(), mb(300))
     fs2 = LimitSizeFS(MemoryFS(), mb(300))
     fs = CuckooDriveFS([fs1, fs2])
     request.addfinalizer(lambda: fs.close())
     return fs
 def setUp(self):
     fs1 = LimitSizeFS(MemoryFS(), mb(300))
     fs2 = LimitSizeFS(MemoryFS(), mb(300))
     self.fs = CuckooDriveFS([fs1, fs2])