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)))
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)))
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
def setUp(self): self.temp_dir = tempfile.mkdtemp(u"fstest") self.fs = LazyFS((osfs.OSFS,(self.temp_dir,)))