(self, test_func)
| 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.") |
nothing calls this directly
no test coverage detected