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

Method tearDown

Lib/test/test_logging.py:1993–2002  ·  view source on GitHub ↗

Shutdown the UDP server.

(self)

Source from the content-addressed store, hash-verified

1991 self.handled = threading.Event()
1992
1993 def tearDown(self):
1994 """Shutdown the UDP server."""
1995 try:
1996 if self.server:
1997 self.server.stop()
1998 if self.sock_hdlr:
1999 self.root_logger.removeHandler(self.sock_hdlr)
2000 self.sock_hdlr.close()
2001 finally:
2002 BaseTest.tearDown(self)
2003
2004 def handle_datagram(self, request):
2005 slen = struct.pack('>L', 0) # length of prefix

Callers

nothing calls this directly

Calls 4

removeHandlerMethod · 0.80
stopMethod · 0.45
closeMethod · 0.45
tearDownMethod · 0.45

Tested by

no test coverage detected