Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

PSL unittest is very explicit and has no magic. Ironically it also has Java written all over it. You must be the first person I met who prefer unittest to pytest.


> PSL unittest is very explicit and has no magic. Ironically it also has Java written all over it.

By “Java written all over it” do you mean that like JUnit for Java, it's an implementation of the xUnit pattern derived from SUnit for Smalltalk?


It didn't have to copy everything down to the camelCase if it was just an implementation of the xUnit pattern with no Java influence.


camelCase is idiomatic in Smalltalk, which as a language and a community was a pretty big influence on other dynamic OO languages like Python and Ruby, and from whence SUnit comes, and thus the whole xUnit world, derives.

So, it's maybe not the best evidence that the Python version is particularly a clone of the Java port.


I sometimes prefer unittest too!

Pytest is very opinionated about how and when it's going to be run. If you want to put a test in say, Jupyter or a Markdown block, unittest is much more amenable to just doing what you want without having to read through documentation to break a whole bunch of magic behavior.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: