docstr: Tests that `constant_value()` raises an expected exception.
docstr_tok: ["Tests","that","`","constant_value","(",")","`","raises","an","expected","exception","."]
code: def testRaggedValuesError(
      self,
      pylist,
      dtype=None,
      ragged_rank=None,
      inner_shape=None,
      exception=None,
      message=None,
  ):
      """Tests that `constant_value()` raises an expected exception."""
      self.assertRaisesRegex(
          exception,
          message,
          ragged_factory_ops.constant_value,
          pylist,
          dtype=dtype,
          ragged_rank=ragged_rank,
          inner_shape=inner_shape,
      )
  
file_path: tensorflow/tensorflow/python/ops/ragged/ragged_constant_value_op_test.py
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_tensor_value
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 2 for calling the RaggedConstantValueOpTest obj's underlying member method code with example usage: obj.testRaggedValuesError(pylist, dtype, ragged_rank, inner_shape, exception, message) without return types