コード例 #1
0
ファイル: test_common.py プロジェクト: uber/tchannel-python
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
ファイル: test_common.py プロジェクト: uber/tchannel-python
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