forked from goodboy/tractor
Update `MsgTypeError` content matching to latest
parent
5e009a8229
commit
cb90f3e6ba
|
@ -285,14 +285,14 @@ def test_basic_payload_spec(
|
||||||
|
|
||||||
if invalid_started:
|
if invalid_started:
|
||||||
msg_type_str: str = 'Started'
|
msg_type_str: str = 'Started'
|
||||||
bad_value_str: str = '10'
|
bad_value: int = 10
|
||||||
elif invalid_return:
|
elif invalid_return:
|
||||||
msg_type_str: str = 'Return'
|
msg_type_str: str = 'Return'
|
||||||
bad_value_str: str = "'yo'"
|
bad_value: str = 'yo'
|
||||||
else:
|
else:
|
||||||
# XXX but should never be used below then..
|
# XXX but should never be used below then..
|
||||||
msg_type_str: str = ''
|
msg_type_str: str = ''
|
||||||
bad_value_str: str = ''
|
bad_value: str = ''
|
||||||
|
|
||||||
maybe_mte: MsgTypeError|None = None
|
maybe_mte: MsgTypeError|None = None
|
||||||
should_raise: Exception|None = (
|
should_raise: Exception|None = (
|
||||||
|
@ -307,8 +307,10 @@ def test_basic_payload_spec(
|
||||||
raises=should_raise,
|
raises=should_raise,
|
||||||
ensure_in_message=[
|
ensure_in_message=[
|
||||||
f"invalid `{msg_type_str}` msg payload",
|
f"invalid `{msg_type_str}` msg payload",
|
||||||
f"value: `{bad_value_str}` does not "
|
f'{bad_value}',
|
||||||
f"match type-spec: `{msg_type_str}.pld: PldMsg|NoneType`",
|
f'has type {type(bad_value)!r}',
|
||||||
|
'not match type-spec',
|
||||||
|
f'`{msg_type_str}.pld: PldMsg|NoneType`',
|
||||||
],
|
],
|
||||||
# only for debug
|
# only for debug
|
||||||
# post_mortem=True,
|
# post_mortem=True,
|
||||||
|
|
Loading…
Reference in New Issue