Skip to content

Commit

Permalink
🐛 Fix remote update
Browse files Browse the repository at this point in the history
  • Loading branch information
michprev committed Nov 28, 2024
1 parent d8e8935 commit 0aba6bb
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions wake/testing/pytest_plugin_multiprocess_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,15 @@ def pytest_runtestloop(self, session: pytest.Session):
exception_info[2],
)

message = messaging.Message(
token=self._firebase_token,
notification=messaging.Notification(
title=f"Exception {exception_info[0]}",
body=f"Process #{index}",
if self._firebase_token is not None:
message = messaging.Message(
token=self._firebase_token,
notification=messaging.Notification(
title=f"Exception {exception_info[0]}",
body=f"Process #{index}",
)
)
)
messaging.send(message)
messaging.send(message)

if progress is not None:
progress.stop()
Expand Down Expand Up @@ -300,14 +301,15 @@ def pytest_runtestloop(self, session: pytest.Session):
if progress is not None:
progress.start()
elif msg[0] == "breakpoint":
message = messaging.Message(
token=self._firebase_token,
notification=messaging.Notification(
title="Breakpoint reached",
body=f"Process #{index}",
if self._firebase_token is not None:
message = messaging.Message(
token=self._firebase_token,
notification=messaging.Notification(
title="Breakpoint reached",
body=f"Process #{index}",
)
)
)
messaging.send(message)
messaging.send(message)

(filename, lineno, function_name, syntax) = pickle.loads(msg[2])
if progress is not None:
Expand Down Expand Up @@ -373,14 +375,15 @@ def pytest_runtestloop(self, session: pytest.Session):

self._processes.pop(index)
elif msg[0] == "pytest_internalerror":
message = messaging.Message(
token=self._firebase_token,
notification=messaging.Notification(
title="Internal pytest error",
body=f"Process #{index}",
if self._firebase_token is not None:
message = messaging.Message(
token=self._firebase_token,
notification=messaging.Notification(
title="Internal pytest error",
body=f"Process #{index}",
)
)
)
messaging.send(message)
messaging.send(message)

exc_info = pytest.ExceptionInfo.from_exc_info(
pickle.loads(msg[2])
Expand Down

0 comments on commit 0aba6bb

Please sign in to comment.