From 304065d9c3f4906ee997e514c9d0cac52c1d5ee7 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Fri, 15 Nov 2024 12:17:36 +0300 Subject: [PATCH] Address review --- Lib/test/libregrtest/run_workers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/libregrtest/run_workers.py b/Lib/test/libregrtest/run_workers.py index 1a14177e51ab7d..dff631f09c5abf 100644 --- a/Lib/test/libregrtest/run_workers.py +++ b/Lib/test/libregrtest/run_workers.py @@ -433,7 +433,8 @@ def run(self) -> None: def _wait_completed(self) -> None: popen = self._popen # only needed for mypy: - assert popen is not None, "Should never call `._popen` before `.run()`" + if popen is None: + raise ValueError("Should never call `._popen` before `.run()`") try: popen.wait(WAIT_COMPLETED_TIMEOUT)