(self)
| 5182 | # when a timeout is set. |
| 5183 | |
| 5184 | def setUp(self): |
| 5185 | super().setUp() |
| 5186 | self.serv_conn = self.newSocket() |
| 5187 | self.addCleanup(self.serv_conn.close) |
| 5188 | # Use a thread to complete the connection, but wait for it to |
| 5189 | # terminate before running the test, so that there is only one |
| 5190 | # thread to accept the signal. |
| 5191 | cli_thread = threading.Thread(target=self.doConnect) |
| 5192 | cli_thread.start() |
| 5193 | self.cli_conn, addr = self.serv.accept() |
| 5194 | self.addCleanup(self.cli_conn.close) |
| 5195 | cli_thread.join() |
| 5196 | self.serv_conn.settimeout(self.timeout) |
| 5197 | |
| 5198 | def doConnect(self): |
| 5199 | self.serv_conn.connect(self.serv_addr) |
nothing calls this directly
no test coverage detected