class_docstr: Test class for cross-validation tests.
class_docstr_tok: ["Test","class","for","cross-validation","tests","."]
docstr: Test to check that cross-validation folds are correctly loaded from a CSV file.
docstr_tok: ["Test","to","check","that","cross-validation","folds","are","correctly","loaded","from","a","CSV","file","."]
code: def test_load_cv_folds(self):
      """Test to check that cross-validation folds are correctly loaded from a CSV file."""
      # create custom CV folds
      custom_cv_folds = self.make_cv_folds_data()[1]
  
      # write the generated CV folds to a CSV file
      fold_file_path = other_dir / "custom_folds.csv"
      with open(fold_file_path, "w", newline="") as foldf:
          w = csv.writer(foldf)
          w.writerow(["id", "fold"])
          for example_id, fold_label in custom_cv_folds.items():
              w.writerow([example_id, fold_label])
  
      # now read the CSV file using _load_cv_folds
      custom_cv_folds_loaded = load_cv_folds(fold_file_path)
  
      self.assertEqual(custom_cv_folds_loaded, custom_cv_folds)
  
imports: import csv
  import itertools
  import json
  import re
  import unittest
  import numpy
  from numpy.testing import assert_almost_equal
  from sklearn.datasets import make_classification
  from sklearn.feature_extraction import FeatureHasher
  from skll.config import load_cv_folds
  from skll.data import FeatureSet
  from skll.experiments import load_featureset, run_configuration
  from skll.learner import Learner
  from skll.utils.testing import compute_expected_folds_for_cv_testing, config_dir, create_jsonlines_feature_files, fill_in_config_paths_for_single_file, other_dir, output_dir, remove_jsonlines_feature_files, train_dir, unlink
label_desc: Use image node_id 5 for calling the TestCrossValidation obj's underlying member method code with example usage: obj.test_load_cv_folds() without return types