Esempio n. 1
0
    def _test_with_args(self, args):
        mr_job = MRGrepJob(['--runner=local', self.input_path] + args)

        with mr_job.make_runner() as runner:
            runner.run()
            self.assertEqual(
                set(mr_job.parse_output_line(line)[1].rstrip()
                    for line in runner.stream_output()),
                CORRECT_ANSWER)
Esempio n. 2
0
    def test_wc(self):
        mr_job = MRGrepJob(['--runner=inline', '-e', '^Ste.*',
                            self.input_path])

        with mr_job.make_runner() as runner:
            runner.run()
            self.assertEqual(
                set(mr_job.parse_output_line(line)[1].rstrip()
                    for line in runner.stream_output()),
                CORRECT_ANSWER)