You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the assertion, we have the message in hexadecimal, to have a clean way to have get the message content.
This is an example of stacktrace with an error message
tests/test_bolt2-01-close_channel.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
runner = <lnprototest.clightning.clightning.Runner object at 0x7fe3eab2f970>
test = [Block:spec_helper.py:41, Connect:spec_helper.py:42, ExpectMsg:spec_helper.py:43, Msg:spec_helper.py:44, Block:spec_helper.py:45, RawMsg:spec_helper.py:46, ...]
def run_runner(runner: Runner, test: Union[Sequence, List[Event], Event]) -> None:
"""
The pytest using the assertion as safe failure, and the exception it is only
an event that must not happen.
From design, lnprototest fails with an exception, and for this reason, if the
lnprototest throws an exception, we catch it, and we fail with an assent.
"""
try:
runner.run(test)
except Exception as ex:
runner.stop()
logging.error(get_traceback(ex))
> assert False, ex
E AssertionError: (ExpectMsg:test_bolt2-01-close_channel.py:70, 'Expected msgtype-shutdown, got msgtype-error: message was error channel_id=a37362839b13f61cfe82d35bd397b1264c389b245847cfb6111b38892546dc77 data=556e6b6e6f776e206368616e6e656c20666f7220574952455f53485554444f574e')
tests/helpers.py:169: AssertionError
----------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
ERROR root:helpers.py:168 Traceback (most recent call last):
File "/home/vincent/Github/lnprototest/tests/helpers.py", line 165, in run_runner
runner.run(test)
File "/home/vincent/Github/lnprototest/lnprototest/runner.py", line 103, in run
all_done = sequence.action(self)
File "/home/vincent/Github/lnprototest/lnprototest/structure.py", line 52, in action
all_done &= e.action(runner)
File "/home/vincent/Github/lnprototest/lnprototest/event.py", line 347, in action
raise EventError(self, "{}: message was {}".format(err, msg.to_str()))
lnprototest.errors.EventError: (ExpectMsg:test_bolt2-01-close_channel.py:70, 'Expected msgtype-shutdown, got msgtype-error: message was error channel_id=a37362839b13f61cfe82d35bd397b1264c389b245847cfb6111b38892546dc77 data=556e6b6e6f776e206368616e6e656c20666f7220574952455f53485554444f574e')
========================================================================== short test summary info ==========================================================================
FAILED tests/test_bolt2-01-close_channel.py::test_close_channel_shutdown_msg - AssertionError: (ExpectMsg:test_bolt2-01-close_channel.py:70, 'Expected msgtype-shutdown, g...
===================================================================== 1 failed, 27 deselected in 9.28s ======================================================================
make: *** [Makefile:14: check] Error 1
Where the data in this case is Unknown channel for WIRE_SHUTDOWN that is contained inside the data=556e6b6e6f776e206368616e6e656c20666f7220574952455f53485554444f574e in the following error message
E AssertionError: (ExpectMsg:test_bolt2-01-close_channel.py:70, 'Expected msgtype-shutdown, got msgtype-error: message was error channel_id=a37362839b13f61cfe82d35bd397b1264c389b245847cfb6111b38892546dc77 ')
The text was updated successfully, but these errors were encountered:
During the assertion, we have the message in hexadecimal, to have a clean way to have get the message content.
This is an example of stacktrace with an error message
Where the data in this case is
Unknown channel for WIRE_SHUTDOWN
that is contained inside thedata=556e6b6e6f776e206368616e6e656c20666f7220574952455f53485554444f574e
in the following error messageE AssertionError: (ExpectMsg:test_bolt2-01-close_channel.py:70, 'Expected msgtype-shutdown, got msgtype-error: message was error channel_id=a37362839b13f61cfe82d35bd397b1264c389b245847cfb6111b38892546dc77 ')
The text was updated successfully, but these errors were encountered: