def test_basics(self):
    temp_path = self.create_temp_file(self.SAMPLE_TEXT)
    expected_words = [('Flourish', 3), ('stomach', 1)]
    wordcount_debugging.run([
        '--input=%s*' % temp_path,
        '--output=%s.result' % temp_path])

    # Parse result file and compare.
    results = self.get_results(temp_path)
    self.assertEqual(sorted(results), sorted(expected_words))
Beispiel #2
0
    def test_basics(self):
        temp_path = self.create_temp_file(self.SAMPLE_TEXT)
        expected_words = [('Flourish', 3), ('stomach', 1)]
        wordcount_debugging.run(
            ['--input=%s*' % temp_path,
             '--output=%s.result' % temp_path])

        # Parse result file and compare.
        results = self.get_results(temp_path)
        self.assertEqual(sorted(results), sorted(expected_words))