コード例 #1
0
ファイル: test_archive.py プロジェクト: maguro/pookeeper
def test_long():
    oa = OutputArchive()
    oa.write_long(9141385893744296737, 'tag')
    ia = InputArchive(str(oa.buffer))
    r = ia.read_long('tag')
    assert type(r) == long
    assert 9141385893744296737 == r

    oa = OutputArchive()
    oa.write_long(1, 'tag')
    ia = InputArchive(str(oa.buffer))
    r = ia.read_long('tag')
    assert type(r) == long
    assert 1 == r