class_docstr: Tests Data Provider operations.
class_docstr_tok: ["Tests","Data","Provider","operations","."]
code: def test_pipeline(self):
      file_source, file_target = test_utils.create_temp_parallel_data(
          sources=["Hello World . 笑"], targets=["Bye 泣"]
      )
  
      pipeline = input_pipeline.ParallelTextInputPipeline(
          params={
              "source_files": [file_source.name],
              "target_files": [file_target.name],
              "num_epochs": 5,
              "shuffle": False,
          },
          mode=tf.contrib.learn.ModeKeys.TRAIN,
      )
  
      data_provider = pipeline.make_data_provider()
  
      features = pipeline.read_from_data_provider(data_provider)
  
      with self.test_session() as sess:
          sess.run(tf.global_variables_initializer())
          sess.run(tf.local_variables_initializer())
          with tf.contrib.slim.queues.QueueRunners(sess):
              res = sess.run(features)
  
      self.assertEqual(res["source_len"], 5)
      self.assertEqual(res["target_len"], 4)
      np.testing.assert_array_equal(
          np.char.decode(res["source_tokens"].astype("S"), "utf-8"),
          ["Hello", "World", ".", "笑", "SEQUENCE_END"],
      )
      np.testing.assert_array_equal(
          np.char.decode(res["target_tokens"].astype("S"), "utf-8"),
          ["SEQUENCE_START", "Bye", "泣", "SEQUENCE_END"],
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import tensorflow
  import numpy
  import yaml
  from seq2seq.data import input_pipeline
  from seq2seq.test import utils
label_desc: Use image node_id 2 for calling the ParallelTextInputPipelineTest obj's underlying member method code with example usage: obj.test_pipeline() without return types