98e2f714e54b761c0a1954ad50a26010c7ef50d9,tensorflow_transform/beam/tft_unit.py,TransformTestCase,assertAnalyzeAndTransformResults,#TransformTestCase#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,40

Before Change


    for filename, file_contents in six.iteritems(expected_vocab_file_contents):
      full_filename = tf_transform_output.vocabulary_file_by_name(filename)
      with tf.gfile.Open(full_filename) as f:
        self.assertEqual(f.readlines(), file_contents)

After Change



    for filename, file_contents in six.iteritems(expected_vocab_file_contents):
      full_filename = tf_transform_output.vocabulary_file_by_name(filename)
      with tf.gfile.Open(full_filename) as f:
        file_lines = f.readlines()

        // Store frequency case.
        if isinstance(file_contents[0], tuple):
          word_and_frequency_list = []
          for content in file_lines:
            frequency, word = content.split(" ", 1)
            word_and_frequency_list.append((word.strip("\n"),
                                            float(frequency.strip("\n"))))
          self.assertAllEqual(
              zip(*word_and_frequency_list)[0], zip(*file_contents)[0])
          np.testing.assert_almost_equal(
              zip(*word_and_frequency_list)[1], zip(*file_contents)[1])
        else:
          file_lines = [content.strip("\n") for content in file_lines]
          self.assertAllEqual(file_lines, file_contents)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: tensorflow/transform
Commit Name: 98e2f714e54b761c0a1954ad50a26010c7ef50d9
Time: 2018-09-24
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/beam/tft_unit.py
Class Name: TransformTestCase
Method Name: assertAnalyzeAndTransformResults


Project Name: deeptools/HiCExplorer
Commit Name: 0050feb55fcde868276ddfbc8da1f42ef1590c2c
Time: 2019-08-22
Author: wolffj@informatik.uni-freiburg.de
File Name: hicexplorer/test/general/test_chicViewpointBackgroundModel.py
Class Name:
Method Name: test_compute_background


Project Name: sassoftware/python-dlpy
Commit Name: 8afa7fb5dc0ef8bb6f2eb98e97d64821624b4e3c
Time: 2019-08-02
Author: Xiaozhuo.Cheng@sas.com
File Name: dlpy/tests/test_speech.py
Class Name: TestSpeechUtils
Method Name: test_segment_audio_2