示例#1
0
def test_format_pbuf(filename, tdata):
    path = tdata.path(datadir + filename)
    with open(path, "rb") as f:
        input = f.read()
    with open(path + "-decoded") as f:
        expected = f.read()

    assert protobuf.format_pbuf(input) == expected
示例#2
0
def test_format_pbuf(filename, tdata):
    path = tdata.path(datadir + filename)
    with open(path, "rb") as f:
        input = f.read()
    with open(path.replace(".bin", "-decoded.bin")) as f:
        expected = f.read()

    assert protobuf.format_pbuf(input) == expected
示例#3
0
def test_format_pbuf(filename):
    path = data.path(filename)
    with open(path, "rb") as f:
        input = f.read()
    with open(path + "-decoded") as f:
        expected = f.read()

    assert protobuf.format_pbuf(input) == expected