[erlang-questions] EUnit quirks
Gareth Adams
gareth.adams@REDACTED
Fri Jul 14 18:45:28 CEST 2017
Hi,
I've been writing some eunit tests using fixtures (http://erlang.org/doc/apps/eunit/chapter.html#Fixtures) and have noticed a couple of quirks.
1. If the setup fails for some reason cleanup is not called. This can be an issue if you're mecking things as the don't get unmecked so the next test setup fails etc. I find myself lost in a cascade of failures, not knowing which tests are really failing.
2. If something fails in the test itself that's not part of an assert, eunit cancels the tests and they are not run. Although this is reported in the console, if you have a lot of tests with debug statements this can be lost. The only thing that indicates that they've not been run is the number of tests decreases, which au not be noticed.
Has anyone else had these issues? If so, how did you handle them?
Thanks
Gareth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170714/b1cdd29c/attachment.htm>
More information about the erlang-questions
mailing list