

def testDocumentIncomplete(self):
    stream = StringIO('{"key":"value"')
    reader = pulljson.JSONPullParser(stream)
    event = reader.nextEvent()
    self.assertEqual(event.type, pulljson.START_OBJECT)
    event = reader.nextEvent()
    reader.assertEqual(event.type, pulljson.FIELD_NAME)
    self.assertEqual(event.value, 'key')
    with self.assertRaises(pulljson.JSONParseError) as cm:
        event = reader.nextEvent()
    self.assertEqual(cm.exception.code, pulljson.JSON_INCOMPLETE_ERROR, cm.exception.msg)

dataset/ETHPy150Open Teradata/PyTd/test/test_pulljson.py TestJSONPullParser.testDocumentIncomplete/VarMisuse@55/73 `self`->`reader`