UnkindPartition / tasty

Modern and extensible testing framework for Haskell
638 stars 108 forks source link

Use displayException instead of show for showing exceptions #330

Closed adamgundry closed 1 year ago

adamgundry commented 2 years ago

Here's my proposed resolution to #327. By calling displayException instead of show we get prettier exception output for any exception type that implements displayException, including tasty's version of HUnitFailure. (Unfortuntately HUnit's version of HUnitFailure doesn't currently implement displayException, but that's a HUnit issue.)

andreasabel commented 2 years ago

Why doesn't this run through CI?

adamgundry commented 2 years ago

I'm not sure if it is to do with my having opened a branch from a fork? Or is it perhaps that Travis CI now requires applying for credits for open source projects?

andreasabel commented 2 years ago

Yeah, Travis is dead, but there is a GHA CI now: https://github.com/UnkindPartition/tasty/blob/16289a77495eb8279c5e544886ef52503becd148/.github/workflows/ci.yaml Maybe it is misconfigured, it says on: [push] where I usually see on: [push, pull_request] or some refinement of this. Ping @UnkindPartition.

andreasabel commented 2 years ago

@adamgundry : I updated the CI triggers. Can you please rebase this onto master and force-push, to see if CI runs now?

adamgundry commented 2 years ago

Thanks @andreasabel, looks like it is indeed running now.

Bodigrim commented 1 year ago

@andreasabel @VictorCMiraldo @martijnbastiaan this looks good to me, any more opinions?

Bodigrim commented 1 year ago

I've updated changelogs, rebased and merged. Thanks, @adamgundry!