コード例 #1
0
def test_item_read_write():
    x = vfs.Root(meta=13)
    stream = BytesIO()
    protocol.write_item(stream, x)
    print('stream:', repr(stream.getvalue()), stream.tell(), file=sys.stderr)
    stream.seek(0)
    wvpasseq(x, protocol.read_item(stream))
コード例 #2
0
def test_item_read_write():
    with no_lingering_errors():
        x = vfs.Root(meta=13)
        stream = BytesIO()
        vfs.write_item(stream, x)
        print('stream:',
              repr(stream.getvalue()),
              stream.tell(),
              file=sys.stderr)
        stream.seek(0)
        wvpasseq(x, vfs.read_item(stream))