(self)
| 388 | return MultiprocessResult(result, stdout) |
| 389 | |
| 390 | def run(self) -> None: |
| 391 | fail_fast = self.runtests.fail_fast |
| 392 | fail_env_changed = self.runtests.fail_env_changed |
| 393 | try: |
| 394 | while not self._stopped: |
| 395 | try: |
| 396 | test_name = next(self.pending) |
| 397 | except StopIteration: |
| 398 | break |
| 399 | |
| 400 | self.start_time = time.monotonic() |
| 401 | self.test_name = test_name |
| 402 | try: |
| 403 | mp_result = self._runtest(test_name) |
| 404 | except WorkerError as exc: |
| 405 | mp_result = exc.mp_result |
| 406 | finally: |
| 407 | self.test_name = _NOT_RUNNING |
| 408 | mp_result.result.duration = time.monotonic() - self.start_time |
| 409 | self.output.put((False, mp_result)) |
| 410 | |
| 411 | if mp_result.result.must_stop(fail_fast, fail_env_changed): |
| 412 | break |
| 413 | except ExitThread: |
| 414 | pass |
| 415 | except BaseException: |
| 416 | self.output.put((True, traceback.format_exc())) |
| 417 | finally: |
| 418 | self.output.put(WorkerThreadExited()) |
| 419 | |
| 420 | def _wait_completed(self) -> None: |
| 421 | popen = self._popen |
nothing calls this directly
no test coverage detected