asdf icon indicating copy to clipboard operation
asdf copied to clipboard

Clean up pytest-asdf output

Open jdavies-st opened this issue 6 years ago • 1 comments

Currently the asdf schema tester pytest plugin is a little wordy.

https://travis-ci.org/spacetelescope/asdf/jobs/563063725

Perhaps use __tracebackhide__ = True or something similar to clean up up the failure reporting if possible.

jdavies-st avatar Jul 25 '19 20:07 jdavies-st

The __tracebackhide__ method only works to silence the traceback of an assertion helper. It cannot work in a plugin like pytest-asdf. But it is possible to have an AsdfSchemaItem.repr_failure method that formats the error message in a more user-friendly way. For an example, see

https://github.com/pytest-dev/pytest/issues/3586#issuecomment-398378594

jdavies-st avatar Jun 24 '20 21:06 jdavies-st