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

Method clientRun

Lib/test/test_socket.py:447–467  ·  view source on GitHub ↗
(self, test_func)

Source from the content-addressed store, hash-verified

445 self.addCleanup(self.done.wait)
446
447 def clientRun(self, test_func):
448 self.server_ready.wait()
449 try:
450 self.clientSetUp()
451 except BaseException as e:
452 self.queue.put(e)
453 self.clientTearDown()
454 return
455 finally:
456 self.client_ready.set()
457 if self.server_crashed:
458 self.clientTearDown()
459 return
460 if not hasattr(test_func, '__call__'):
461 raise TypeError("test_func must be a callable function")
462 try:
463 test_func()
464 except BaseException as e:
465 self.queue.put(e)
466 finally:
467 self.clientTearDown()
468
469 def clientSetUp(self):
470 raise NotImplementedError("clientSetUp must be implemented.")

Callers

nothing calls this directly

Calls 6

clientSetUpMethod · 0.95
clientTearDownMethod · 0.95
test_funcClass · 0.70
waitMethod · 0.45
putMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected