Closed kana closed 6 years ago
An idea:
after
if example.failed
... (inspect the current buffer and/or other stuffs)
... (then output additional messages)
endif
end
:+1: I need this. My travis tests are failed and I cannot understand why (second test): https://travis-ci.org/klen/python-mode
@klen It seems to be another kind of problems. vim-vspec tried reporting a runtime error (which is not an expectation failure), but the traceback from Python was truncated between the first line and the second line. If the full traceback is available, it's not so hard to understand the cause of the problem, isn't it?
Yes, it is. Traceback could help actually.
For your information, I fixed to properly show a full traceback.
It seems to be impossible with :after
. The state that must be inspected might not be available in :after
. So that adding more :Expect
s (and debug output from arbitrary line) seems to be a better solution.
When an expectation is failed, the default "Expected: XXX, Actual: YYY" message sometimes doesn't help much to understand the cause of the failure. So that it would be useful to output more messages about the failure by inspecting the current state, such as buffers, key mappings, and so on.