예제 #1
0
 def test_do_listdir_err(self):
     try:
         path = os.path.join('/tmp', str(random.random()))
         fs.do_listdir(path)
     except GlusterFileSystemOSError:
         pass
     else:
         self.fail("GlusterFileSystemOSError expected")
예제 #2
0
 def test_do_listdir_err(self):
     try:
         path = os.path.join('/tmp', str(random.random()))
         fs.do_listdir(path)
     except GlusterFileSystemOSError:
         pass
     else:
         self.fail("GlusterFileSystemOSError expected")
예제 #3
0
    def test_do_listdir(self):
        tmpdir = mkdtemp()
        try:
            subdir = []
            for i in range(5):
                subdir.append(mkdtemp(dir=tmpdir).rsplit(os.path.sep, 1)[1])

            assert subdir.sort() == fs.do_listdir(tmpdir).sort()
        finally:
            shutil.rmtree(tmpdir)
예제 #4
0
    def test_do_listdir(self):
        tmpdir = mkdtemp()
        try:
            subdir = []
            for i in range(5):
                subdir.append(mkdtemp(dir=tmpdir).rsplit(os.path.sep, 1)[1])

            assert subdir.sort() == fs.do_listdir(tmpdir).sort()
        finally:
            shutil.rmtree(tmpdir)