I'm trying to port one of my python packages to nim. The package uses 
[pytest](https://docs.pytest.org/en/stable/)

I'm really confused about testing in nim.

The documentation for testament (at lest the one I've managed to find) is 
mostly about how to invoke it. Most searches just finds some issues and debate 
about testament vs unittest. Then there are some statements about the compiler 
itself using testament, so one can see examples there.

I then took a look at `tests/stdlib/tos.nim` trying to figure out how to write 
testcases.

  * It seems to be just one huge test-case (a lot of test-points obviously)
  * Assuming the above is correct, will an error in any place in the file abort 
that file?
  * Is there no separation between prerequisites and test cases?
  * Is there any setup (prerequisite) support?
  * Is there any tear-down support?
  * Is there a way of having multiple test-cases in one file and executing only 
some, based on test name (is there any such thing?) and tags?
  * Is there a way of having test parametrisation?
  * Is the parallel execution by testament done per-file?



Has there been any discussion about porting pytest? Not to achieve a one-to-one 
feature list (pytest has it's own quirks) but just taking all the excellent 
concepts, like `fixtures`? 

Reply via email to