def autoLoopBackTest(value): s = StringIO() hessian.writeObject(WriteContext(s), value, None) s.seek(0) r = readObjectByPrefix(ParseContext(s), s.read(1)) assert r == value
def readObjectString(txt): stream = StringIO(txt) return readObjectByPrefix(ParseContext(stream), stream.read(1))