示例#1
0
    def test_bytes_value_protocol(self):
        job = MRJob()
        job.OUTPUT_PROTOCOL = BytesValueProtocol

        self.assertEqual(
            job.parse_output_line(b'one two\n'),
            (None, b'one two\n'))
示例#2
0
    def test_bytes_value_protocol(self):
        job = MRJob()
        job.OUTPUT_PROTOCOL = BytesValueProtocol

        self.assertEqual(
            job.parse_output_line(b'one two\n'),
            (None, b'one two\n'))
示例#3
0
    def test_bytes_value_protocol(self):
        job = MRJob()
        job.OUTPUT_PROTOCOL = BytesValueProtocol

        data = iter([b'one\nt', b'wo\nthree\n', b'four\nfive\n'])
        self.assertEqual(list(job.parse_output(data)), [(None, b'one\n'),
                                                        (None, b'two\n'),
                                                        (None, b'three\n'),
                                                        (None, b'four\n'),
                                                        (None, b'five\n')])
示例#4
0
    def test_bytes_value_protocol(self):
        job = MRJob()
        job.OUTPUT_PROTOCOL = BytesValueProtocol

        data = iter([b'one\nt', b'wo\nthree\n', b'four\nfive\n'])
        self.assertEqual(
            list(job.parse_output(data)),
            [(None, b'one\n'),
             (None, b'two\n'),
             (None, b'three\n'),
             (None, b'four\n'),
             (None, b'five\n')])