numirias / pytest-json-report

🗒️ A pytest plugin to report test results as JSON
MIT License
147 stars 39 forks source link

Don't crash when used with native traceback #63

Closed rciorba closed 3 years ago

rciorba commented 3 years ago

Changes the traceback handling to also work with native trace-backs.

WARNING: The traceback in the final report will have a different structure than what would be produced with pytest's default traceback option.

Because the native traceback internally lacks path, lineno and message for each TB frame (it's just the line of a native Python TB) it's not easy (perhaps not even possible) to match the same format. I chose to simply report the TB as one string. Let me know if you have other preferences here.

Fixes #62