class_docstr: Test class for running examples.
docstr: Create directories for testing, and copy files to new locations.
docstr_tok: ["Create","directories","for","testing",",","and","copy","files","to","new","locations","."]
code: def setUpClass(cls):
      """Create directories for testing, and copy files to new locations."""
      # Create the directories we need for california and iris;
      # if these directories already exist, it's fine
      for dir_path in [_new_iris_dir, _new_california_dir]:
          dir_path.mkdir(exist_ok=True)
  
      # We get rid of the new titanic directory, if it already exists,
      # because `copytree()` will raise an error if it already exists.
      # Note :: In Python 3.8, `copytree()` has a new argument,
      # `dirs_exist_ok`, which would render this step unnecessary.
      if _new_titanic_dir.exists():
          rmtree(_new_titanic_dir)
  
      # Copy the titanic data to our new directories
      copytree(_old_titanic_dir, _new_titanic_dir)
  
      # Create all of the data sets we need
      python_binary = (
          _binary_dir / "python" if _binary_dir else "python"
      )
      subprocess.run(
          [
              python_binary,
              examples_dir / "make_titanic_example_data.py",
          ],
          cwd=_new_titanic_dir.parent,
      )
      subprocess.run(
          [
              python_binary,
              examples_dir / "make_california_example_data.py",
          ],
          cwd=_new_california_dir.parent,
      )
      subprocess.run(
          [python_binary, examples_dir / "make_iris_example_data.py"],
          cwd=_new_iris_dir.parent,
      )
  
      # Move all the configuration files to our new directories
      for cfg_file in _old_titanic_dir.glob("*.cfg"):
          copyfile(cfg_file, _new_titanic_dir / cfg_file.name)
  
      for cfg_file in _old_california_dir.glob("*.cfg"):
          copyfile(cfg_file, _new_california_dir / cfg_file.name)
  
      for cfg_file in _old_iris_dir.glob("*.cfg"):
          copyfile(cfg_file, _new_iris_dir / cfg_file.name)
  
file_path: skll/tests/test_examples.py
imports: import json
  import subprocess
  import unittest
  from os import environ
  from pathlib import Path
  from shutil import copyfile, copytree, rmtree
  from skll.experiments import run_configuration
  from skll.utils.testing import examples_dir, other_dir
label_desc: Use image node_id 1 for calling the TestExamples obj's underlying member method code with example usage: obj.setUpClass(cls) without return types