docstr: Tests making a CSV dataset with an encoding except for utf-8.
docstr_tok: ["Tests","making","a","CSV","dataset","with","an","encoding","except","for","utf-8","."]
code: def testEncoding(self):
      """Tests making a CSV dataset with an encoding except for utf-8."""
      record_defaults = [
          constant_op.constant([], dtypes.string),
          constant_op.constant([], dtypes.string),
      ]
  
      column_names = ["col%d" % i for i in range(2)]
      inputs = [
          [",".join(x for x in column_names), "さる,猿", "とり,鳥"],
          [",".join(x for x in column_names), "いぬ,犬", "ねこ,猫"],
      ]
      expected_output = [
          ["さる".encode("shift-jis"), "猿".encode("shift-jis")],
          ["とり".encode("shift-jis"), "鳥".encode("shift-jis")],
          ["いぬ".encode("shift-jis"), "犬".encode("shift-jis")],
          ["ねこ".encode("shift-jis"), "猫".encode("shift-jis")],
      ]
      label = "col0"
  
      self._test_dataset(
          inputs,
          expected_output=expected_output,
          expected_keys=column_names,
          column_names=column_names,
          label_name=label,
          batch_size=1,
          num_epochs=1,
          shuffle=False,
          header=True,
          column_defaults=record_defaults,
          encoding="shift-jis",
      )
  
imports: import gzip
  import os
  import zlib
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.experimental.ops import readers
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.util import nest
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the MakeCsvDatasetTest obj's underlying member method code with example usage: obj.testEncoding() without return types