-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(outputHandler_json): for pending tests and json encoding #748
base: master
Are you sure you want to change the base?
Conversation
293770f
to
fea7d53
Compare
5d346ba
to
083eae0
Compare
io_write(err_msg) | ||
error(err_msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why write and error the same message? Is this what the other instances in the code base of manually writing to stderr and then exiting are working around?
io_write(err_msg) | |
error(err_msg) | |
error(err_msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my undertading, writing to stdout here is for the cases when json output is redirected to a file, so that the error goes to the file too. I assumed someone maybe relying on that, so left this line just in case, but with a better error message.
Fix for #729: pending tests without function argument have an attribute of
default_fn: <function>
, which cannot be encoded into json.Improved json output formatter to handle pending tests and provide better error reporting if custom non-string attributes cannot be encoded into json.