Beispiel #1
0
 def test_binderr(self):
     with pytest.raises(socket.error, match="prohibited"):
         tcp.TCPServer(("localhost", 8080))
Beispiel #2
0
 def test_wait_for_silence(self):
     s = tcp.TCPServer(("127.0.0.1", 0))
     with s.handler_counter:
         with pytest.raises(exceptions.Timeout):
             s.wait_for_silence()
         s.shutdown()