Right now there's the following disclaimer at the top of the unittest module docs:
Instead of unittest.nim, please consider to use the testament tool which offers process isolation for your tests. Also when isMainModule: doAssert conditionHere is usually a much simpler solution for testing purposes.
I feel like:
testament should be removed unless it gets properly released (installable via Nimble) with docsisMainModule: doAssert at the top (along with the mention of testament) makes the module feel like it's deprecated or something. I think it'd be better to remove that or have a more detailed explanation presenting isMainModule: doAssert as an option alongside unittest.Does anyone have any particular qualms with this?
Thanks
But testament ships with Nim, there is no need to "nimble install" it. Unittest has open bugs that nobody is working on and once it's fixed, it's still the wrong design anyway IMO. Process isolation and running tests in parallel are good things. Testament offers them.
Ah, that makes sense. But, there still aren't any docs on it and as a result I've never heard of a single project that uses it beyond Nim itself. That's why I think we could just remove the mention of it now and then if it gets properly documented and people start using it it's as simple as dropping it back in with a link.
FWiW, I'm new to Nim, I had exactly the reaction described above, and testament does not appear to have been installed with Nim (at least there is not a binary in /usr/local/Cellar/nim/1.2.6/bin). After 15 minutes trying to get Google to not return results about the Bible, I found myself here.
It would be useful to ensure that testament is shipped but also to write a bit more about the different ways that tests can be written in Nim, including the trade offs and advantages of each method.
Now, testament has docs.
Most helpful comment
FWiW, I'm new to Nim, I had exactly the reaction described above, and
testamentdoes not appear to have been installed with Nim (at least there is not a binary in/usr/local/Cellar/nim/1.2.6/bin). After 15 minutes trying to get Google to not return results about the Bible, I found myself here.