Пример #1
0
def test_tracing_round_trip():
    for i in xrange(100):
        t = Tracing(
            random.randint(0, 100000), random.randint(0, 100000), random.randint(0, 100000), random.randint(0, 1)
        )

        buff = tracing_rw.write(t, BytesIO()).getvalue()
        assert t == tracing_rw.read(BytesIO(buff))
Пример #2
0
def test_tracing_round_trip():
    for i in range(100):
        t = Tracing(
            random.randint(0, 100000),
            random.randint(0, 100000),
            random.randint(0, 100000),
            random.randint(0, 1),
        )

        buff = tracing_rw.write(t, BytesIO()).getvalue()
        assert t == tracing_rw.read(BytesIO(buff))
Пример #3
0
def test_tracing_read(tracing, bs):
    assert tracing_rw.read(BytesIO(bytearray(bs))) == tracing
Пример #4
0
def test_tracing_read(tracing, bs):
    assert tracing_rw.read(BytesIO(bytearray(bs))) == tracing