MCPcopy Index your code
hub / github.com/python/cpython / tearDown

Method tearDown

Lib/test/test_smtplib.py:261–275  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

259 self.serv_evt.clear()
260
261 def tearDown(self):
262 socket.getfqdn = self.real_getfqdn
263 # indicate that the client is finished
264 self.client_evt.set()
265 # wait for the server thread to terminate
266 self.serv_evt.wait()
267 threading_helper.join_thread(self.thread)
268 # restore sys.stdout
269 sys.stdout = self.old_stdout
270 # restore DEBUGSTREAM
271 smtpd.DEBUGSTREAM.close()
272 smtpd.DEBUGSTREAM = self.old_DEBUGSTREAM
273 del self.thread
274 self.doCleanups()
275 threading_helper.threading_cleanup(*self.thread_key)
276
277 def get_output_without_xpeer(self):
278 test_output = self.output.getvalue()

Callers

nothing calls this directly

Calls 5

join_threadMethod · 0.80
doCleanupsMethod · 0.80
setMethod · 0.45
waitMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected