Cleans up the test server. This method should not be called manually, it is added to the cleanup queue in the _setup method already.
(self)
| 305 | return self.client, self.server |
| 306 | |
| 307 | def _cleanup(self): |
| 308 | """ |
| 309 | Cleans up the test server. This method should not be called manually, |
| 310 | it is added to the cleanup queue in the _setup method already. |
| 311 | """ |
| 312 | # if logout was called already we'd raise an exception trying to |
| 313 | # shutdown the client once again |
| 314 | if self.client is not None and self.client.state != 'LOGOUT': |
| 315 | self.client.shutdown() |
| 316 | # cleanup the server |
| 317 | self.server.shutdown() |
| 318 | self.server.server_close() |
| 319 | threading_helper.join_thread(self.thread) |
| 320 | # Explicitly clear the attribute to prevent dangling thread |
| 321 | self.thread = None |
| 322 | |
| 323 | def test_EOF_without_complete_welcome_message(self): |
| 324 | # http://bugs.python.org/issue5949 |
no test coverage detected