

@pytest.mark.parametrize('order', [(0, 1), (1, 0)])
def test_socket_pair(self, order):
    data = 'Hello World'
    pair = socket_pair()
    pair[order[0]].sendall(data)
    (ready, _, _) = select.select([pair[0], pair[1]], [], [])
    assert ((len(ready) == 1) and (ready[0] == pair[order[1]]))
    resp = pair[order[1]].recv(64)
    assert (resp == data)

dataset/ETHPy150Open geky/pyDAPLink/pyDAPLink/test/test_utility.py TestSocketPair.test_socket_pair/original