def test_readTruncatedUTF8Bytes(self) -> None:
    "\n        If the JSON text for a record is truncated in the middle of a two-byte\n        Unicode codepoint, we don't want to see a codec exception and the\n        stream is read properly when the additional data arrives.\n        "
    with BytesIO(b'\x1e{"x": "\xe2\x82\xac"}\n') as fileHandle:
        events = iter(eventsFromJSONLogFile(fileHandle, bufferSize=8))
        self.assertEqual(next(events), {'x': '€'})
        self.assertRaises(StopIteration, next, events)
        self.assertEqual(len(self.errorEvents), 0)
If the JSON text for a record is truncated in the middle of a two-byte
Unicode codepoint, we don't want to see a codec exception and the
stream is read properly when the additional data arrives.
def test_readTruncatedUTF8Bytes(self) -> None:
    "\n        If the JSON text for a record is truncated in the middle of a two-byte\n        Unicode codepoint, we don't want to see a codec exception and the\n        stream is read properly when the additional data arrives.\n        "
    with BytesIO(b'\x1e{"x": "\xe2\x82\xac"}\n') as fileHandle:
        events = iter(eventsFromJSONLogFile(fileHandle, bufferSize=8))
        self.assertEqual(next(events), {'x': '€'})
        self.assertRaises(StopIteration, next, events)
        self.assertEqual(len(self.errorEvents), 0)