tokio/pytest_plugin.py
def port():
    """Return a port that is unused on the current host."""
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
        s.bind(('127.0.0.1', 0))
        return s.getsockname()[1]
Return a port that is unused on the current host.
Return a port that is unused on the current host.
Return a port that is unused on the current host .
def port():
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
        s.bind(('127.0.0.1', 0))
        return s.getsockname()[1]
def port ( ) : with socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) as s : s . bind ( ( '127.0.0.1' , 0 ) ) return s . getsockname ( ) [ 1 ]
Return a port that is unused on the current host.
Return a port that is unused on the current host .
"""Return a port that is unused on the current host."""