Exemple #1
0
class TestLazyFS(unittest.TestCase, FSTestCases, ThreadingTestCases):
    def setUp(self):
        self.temp_dir = tempfile.mkdtemp(u"fstest")
        self.fs = LazyFS((osfs.OSFS, (self.temp_dir, )))

    def tearDown(self):
        shutil.rmtree(self.temp_dir)
        self.fs.close()

    def check(self, p):
        return os.path.exists(os.path.join(self.temp_dir, relpath(p)))
Exemple #2
0
class TestLazyFS(unittest.TestCase, FSTestCases, ThreadingTestCases):
    
    def setUp(self):
        self.temp_dir = tempfile.mkdtemp(u"fstest")
        self.fs = LazyFS((osfs.OSFS,(self.temp_dir,)))

    def tearDown(self):
        shutil.rmtree(self.temp_dir)
        self.fs.close()

    def check(self, p):
        return os.path.exists(os.path.join(self.temp_dir, relpath(p)))
Exemple #3
0
 def get_fs(cls, registry, fs_name, fs_name_params, fs_path,  writeable, create_dir):
     from fs.tempfs import TempFS
     from fs.wrapfs.lazyfs import LazyFS
     fs = LazyFS((TempFS,(),{"identifier":fs_name_params}))
     return fs, fs_path
Exemple #4
0
 def setUp(self):
     self.temp_dir = tempfile.mkdtemp(u"fstest")
     self.fs = LazyFS((osfs.OSFS,(self.temp_dir,)))