def test_readUnseparated(self):
        """
        Multiple events without a record separator are skipped.
        """
        with StringIO(
            u'\x1e{"x": 1}\n'
            u'{"y": 2}\n'
        ) as fileHandle:
            events = eventsFromJSONLogFile(fileHandle)

            self.assertRaises(StopIteration, next, events)  # No more events

            # We should have logged the lost record
            self.assertEqual(len(self.errorEvents), 1)
            self.assertEqual(
                self.errorEvents[0]["log_format"],
                u"Unable to read JSON record: {record!r}"
            )
            self.assertEqual(
                self.errorEvents[0]["record"],
                b'{"x": 1}\n{"y": 2}\n'
            )

        Multiple events without a record separator are skipped.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/logger/test/test_json.py