File: test_ssh.py

package info (click to toggle)
pyzmq 27.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,984 kB
  • sloc: python: 15,189; ansic: 285; makefile: 169; sh: 85
file content (9 lines) | stat: -rw-r--r-- 235 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
from zmq.ssh.tunnel import select_random_ports


def test_random_ports():
    for i in range(4096):
        ports = select_random_ports(10)
        assert len(ports) == 10
        for p in ports:
            assert ports.count(p) == 1