| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| return type(e1) is type(e2) and e1.args == e2.args | ||
|
|
||
| def round_trip_repr(e): | ||
| assert exceptions_eq(e, eval(repr(e))) |
There was a problem hiding this comment.
Nitpicky, but maybe this should return and the assert should be where it's called? That way an error would show the line with the exception variable instead of just the parameters.
Sorry, something went wrong.
There was a problem hiding this comment.
I based it on the round_trip_test() from json_snippet.py where it has similar logic. But I agree it’d be a bit nicer to move asserts out of the function. Shall I change it just here, or in both snippets (I haven’t found any other round-tripy utils)?
Sorry, something went wrong.
|
Also corrected the last test case in json_snippets.py – because of a typo (* instead of **) it did not test what it was supposed to test… |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Closes #1088