forked from goodboy/tractor
1
0
Fork 0

Change `reraise` to `post_mortem: bool` in `maybe_expect_raises()`

runtime_to_msgspec
Tyler Goodlet 2024-05-30 16:02:59 -04:00
parent fcd089c08f
commit cdb1311e40
1 changed files with 5 additions and 3 deletions

View File

@ -46,7 +46,7 @@ maybe_msg_spec = PldMsg|None
async def maybe_expect_raises(
raises: BaseException|None = None,
ensure_in_message: list[str]|None = None,
reraise: bool = False,
post_mortem: bool = False,
timeout: int = 3,
) -> None:
'''
@ -86,8 +86,8 @@ async def maybe_expect_raises(
f'{inner_err.args}'
)
if reraise:
raise inner_err
if post_mortem:
await tractor.post_mortem()
else:
if raises:
@ -314,6 +314,8 @@ def test_basic_payload_spec(
f"value: `{bad_value_str}` does not "
f"match type-spec: `{msg_type_str}.pld: PldMsg|NoneType`",
],
# only for debug
post_mortem=True,
),
p.open_context(
child,