docstr: Tests that signature mismatch is an error (when configured so).
docstr_tok: ["Tests","that","signature","mismatch","is","an","error","(","when","configured","so",")","."]
code: def testSigMismatchIsError(self):
      """Tests that signature mismatch is an error (when configured so)."""
      if not np_utils._supports_signature():
          self.skipTest("inspect.signature not supported")
  
      np_utils.set_is_sig_mismatch_an_error(True)
  
      def np_fun(x, y=1, **kwargs):
          return
  
      with self.assertRaisesRegex(TypeError, "Cannot find parameter"):
  
          @np_utils.np_doc(None, np_fun=np_fun)
          def f1(a):
              return
  
      with self.assertRaisesRegex(TypeError, "is of kind"):
  
          @np_utils.np_doc(None, np_fun=np_fun)
          def f2(x, kwargs):
              return
  
      with self.assertRaisesRegex(
          TypeError, "Parameter y should have a default value"
      ):
  
          @np_utils.np_doc(None, np_fun=np_fun)
          def f3(x, y):
              return
  
file_path: tensorflow/tensorflow/python/ops/numpy_ops/np_utils_test.py
imports: from absl.testing import parameterized
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops.numpy_ops import np_utils
  from tensorflow.python.platform import test
label_desc: Use image node_id 8 for calling the UtilsTest obj's underlying member method code with example usage: obj.testSigMismatchIsError() without return types