diff --git a/notebook/tests/launchnotebook.py b/notebook/tests/launchnotebook.py index 25ce8c81684..300c5202ddf 100644 --- a/notebook/tests/launchnotebook.py +++ b/notebook/tests/launchnotebook.py @@ -53,6 +53,8 @@ def wait_until_alive(cls): for _ in range(int(MAX_WAITTIME/POLL_INTERVAL)): try: cls.fetch_url(url) + except ModuleNotFoundError as error: + raise ModuleNotFoundError(error) except Exception as e: if not cls.notebook_thread.is_alive(): raise RuntimeError("The notebook server failed to start") from e