'Test that file handles are cached.'

def testOpenFilehandles(self):

    current_process = psutil.Process(os.getpid())
    num_open_files = len(current_process.open_files())
    path = os.path.join(self.base_path, 'morenumbers.txt')
    fds = []
    for _ in range(100):
        fd = vfs.VFSOpen(rdf_paths.PathSpec(path=path, pathtype=rdf_paths.PathSpec.PathType.OS))
        self.assertEqual(fd.read(20), '1\n2\n3\n4\n5\n6\n7\n8\n9\n10')
        fds.append(fd)
    self.assertTrue(((len(current_process.open_files()) - num_open_files) < 5))
