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'))
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')])
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')])