import tensorflow as tf

      y, = tf.py_func(bad1, [], [tf.string])
      z, = tf.py_func(bad2, [], [tf.float64])
      with self.assertRaisesRegexp(errors.UnimplementedError,
                                   "Unsupported numpy type"):
        y.eval()
      with self.assertRaisesRegexp(errors.UnimplementedError,
                                   "Unsupported object type"):
        z.eval()


if __name__ == "__main__":
  tf.test.main()
