docstr: Tests that proper errors are raised.
      
docstr_tok: ["Tests","that","proper","errors","are","raised","."]
code: def testErrors(self):
      """Tests that proper errors are raised."""
      shape = [2, 3]
      with self.assertRaisesWithPredicateMatch(
          ValueError, "minval must be a scalar; got a tensor of shape "
      ):
  
          @def_function.function
          def f():
              stateless.stateless_random_uniform(
                  shape=shape,
                  seed=[1, 2],
                  minval=array_ops.zeros(shape, "int32"),
                  maxval=100,
                  dtype="int32",
              )
  
          f()
      with self.assertRaisesWithPredicateMatch(
          ValueError, "maxval must be a scalar; got a tensor of shape "
      ):
  
          @def_function.function
          def f2():
              stateless.stateless_random_uniform(
                  shape=shape,
                  seed=[1, 2],
                  minval=0,
                  maxval=array_ops.ones(shape, "int32") * 100,
                  dtype="int32",
              )
  
          f2()
  
imports: import functools
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.compat import compat
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import gen_stateless_random_ops_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 27 for calling the StatelessOpsTest obj's underlying member method code with example usage: obj.testErrors() without return types