  # Set the TMPDIR environment variable in addition to tempfile.tempdir
  # so that children processes inherit it.
  tempfile.tempdir = os.environ['TMPDIR'] = TMPDIR
  
  # Removing the temporary TMPDIR. Ensure we pass in unicode so that it will
  # successfully remove temp trees containing non-ASCII filenames on Windows.
  # (We're assuming the temp dir name itself only contains ASCII characters.)
  atexit.register(shutil.rmtree, six.text_type(TMPDIR))
  
  
  SUBDIRS_TO_SKIP = [
      'data',
      'import_error_package',
 
</s> remove             # Class names must be ASCII in Python 2.x, so we forcibly coerce it
            # here to break early if there's a problem.
            to = str(to)
 </s> add  </s> remove                 s = six.text_type(s)
 </s> add                 s = str(s) </s> remove             # Note: We use .decode() here, instead of six.text_type(s, encoding,
 </s> add             # Note: We use .decode() here, instead of str(s, encoding, </s> remove                 if isinstance(field_value, six.string_types):
 </s> add                 if isinstance(field_value, str): </s> remove             return six.text_type(s).encode(encoding)
 </s> add             return str(s).encode(encoding)
# Removing the temporary TMPDIR.
atexit.register(shutil.rmtree, TMPDIR)
  # Set the TMPDIR environment variable in addition to tempfile.tempdir
  # so that children processes inherit it.
  tempfile.tempdir = os.environ['TMPDIR'] = TMPDIR
  
# Removing the temporary TMPDIR.
atexit.register(shutil.rmtree, TMPDIR)
# Removing the temporary TMPDIR.
atexit.register(shutil.rmtree, TMPDIR)
# Removing the temporary TMPDIR.
atexit.register(shutil.rmtree, TMPDIR)
# Removing the temporary TMPDIR.
atexit.register(shutil.rmtree, TMPDIR)
  
  
  SUBDIRS_TO_SKIP = [
      'data',
      'import_error_package',
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
tests/runtests.py