code: def testConstructorErrorsTensorInput(self):
      with self.assertRaisesRegex(
          TypeError,
          "The `filenames` argument must contain `tf.string` elements. Got "
          "`tf.int32` elements.",
      ):
          readers.TFRecordDataset([1, 2, 3])
      with self.assertRaisesRegex(
          TypeError,
          "The `filenames` argument must contain `tf.string` elements. Got "
          "`tf.int32` elements.",
      ):
          readers.TFRecordDataset(constant_op.constant([1, 2, 3]))
      # convert_to_tensor raises different errors in graph and eager
      with self.assertRaises(Exception):
          readers.TFRecordDataset(object())
  
imports: import gzip
  import os
  import pathlib
  import zlib
  from absl.testing import parameterized
  from tensorflow.python.data.kernel_tests import checkpoint_test_base
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.kernel_tests import tf_record_test_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.data.ops import readers
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the TFRecordDatasetTest obj's underlying member method code with example usage: obj.testConstructorErrorsTensorInput() without return types