(self)
| 5079 | # when a timeout is set. |
| 5080 | |
| 5081 | def setUp(self): |
| 5082 | super().setUp() |
| 5083 | self.serv_conn = self.newSocket() |
| 5084 | self.addCleanup(self.serv_conn.close) |
| 5085 | # Use a thread to complete the connection, but wait for it to |
| 5086 | # terminate before running the test, so that there is only one |
| 5087 | # thread to accept the signal. |
| 5088 | cli_thread = threading.Thread(target=self.doConnect) |
| 5089 | cli_thread.start() |
| 5090 | self.cli_conn, addr = self.serv.accept() |
| 5091 | self.addCleanup(self.cli_conn.close) |
| 5092 | cli_thread.join() |
| 5093 | self.serv_conn.settimeout(self.timeout) |
| 5094 | |
| 5095 | def doConnect(self): |
| 5096 | self.serv_conn.connect(self.serv_addr) |
nothing calls this directly
no test coverage detected