Ejemplo n.º 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))
Ejemplo n.º 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))
Ejemplo n.º 3
0
def test_tracing_read(tracing, bs):
    assert tracing_rw.read(BytesIO(bytearray(bs))) == tracing
Ejemplo n.º 4
0
def test_tracing_read(tracing, bs):
    assert tracing_rw.read(BytesIO(bytearray(bs))) == tracing