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

Method clientRun

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

clientSetUpMethod · 0.95
clientTearDownMethod · 0.95
hasattrFunction · 0.85
test_funcFunction · 0.50
waitMethod · 0.45
putMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected