MCPcopy Index your code
hub / github.com/RustPython/RustPython / _cleanup

Method _cleanup

Lib/test/test_imaplib.py:308–322  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 5

tearDownMethod · 0.45
setUpModuleFunction · 0.45
run_python_until_endFunction · 0.45
kill_pythonFunction · 0.45

Calls 3

join_threadMethod · 0.80
shutdownMethod · 0.45
server_closeMethod · 0.45

Tested by

no test coverage detected