Skip to content

Commit

Permalink
include traceback in wrong error in raises_remote
Browse files Browse the repository at this point in the history
for easier debugging
  • Loading branch information
minrk committed Oct 30, 2024
1 parent d7713f6 commit 7742389
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ipyparallel/tests/clienttest.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ def raises_remote(etype):
except error.CompositeError as e:
e.raise_exception()
except error.RemoteError as e:
tb = '\n'.join(e.render_traceback())
assert (
expected_ename == e.ename
), f"Should have raised {expected_ename}, but raised {e.ename}"
), f"Should have raised {expected_ename}, but raised {e.ename}:\n{tb}"

else:
pytest.fail("should have raised a RemoteError")
Expand Down

0 comments on commit 7742389

Please sign in to comment.