def test_byte(): oa = OutputArchive() for b in range(256): oa.write_byte(b, 'tag_' + str(b)) ia = InputArchive(str(oa.buffer)) for b in range(256): r = ia.read_byte('tag_' + str(b)) assert b == r