From 5968a3c773140d71b2e006f3974dbb0671d7eca6 Mon Sep 17 00:00:00 2001 From: goodboy Date: Tue, 24 Mar 2026 16:45:24 -0400 Subject: [PATCH] Use `''` for unresolvable `.boxed_type_str` Add a teensie unit test to match. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tests/test_reg_err_types.py | 10 ++++++++++ tractor/_exceptions.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test_reg_err_types.py b/tests/test_reg_err_types.py index 1164d246..ab14ae5a 100644 --- a/tests/test_reg_err_types.py +++ b/tests/test_reg_err_types.py @@ -165,6 +165,16 @@ class TestRegErrTypesPlumbing: is tractor.ContextCancelled ) + def test_boxed_type_str_without_ipc_msg(self): + ''' + When a `RemoteActorError` is constructed + without an IPC msg (and no resolvable type), + `.boxed_type_str` should return `''`. + + ''' + rae = RemoteActorError('test') + assert rae.boxed_type_str == '' + # -- IPC-level integration tests -- diff --git a/tractor/_exceptions.py b/tractor/_exceptions.py index 3e1624e2..21d76d1c 100644 --- a/tractor/_exceptions.py +++ b/tractor/_exceptions.py @@ -491,7 +491,7 @@ class RemoteActorError(Exception): if self._ipc_msg: return self._ipc_msg.boxed_type_str - return '' + return '' @property def boxed_type(self) -> Type[BaseException]: