import tensorflow as tf

        self.assertAllEqual([[i * 2] * 5], result)

  def test_input_batch_size_should_be_one(self):
    with self.test_session() as session:
      @dynamic_batching.batch_fn
      def f(a):
        return a

      output = f(tf.constant([1, 2]))

      coord = tf.train.Coordinator()
      tf.train.start_queue_runners(coord=coord)

      with self.assertRaises(tf.errors.CancelledError):
        session.run(output)

