What is the difference between unittest, pytest and nose modules?

user3142208 picture user3142208 · Feb 9, 2015 · Viewed 10.5k times · Source

I'm new in python testing and am having some diffiulties choosing between unittest, pytest and nose nose. I'm bulding a test lib that requires : installing a package changing the conf restarting deamons and unsintalling the packages on a linux box. Which test framewok will be the best between thoses three?

At the end of the test I'd like very much to have : n test Suceeded n test Skiped n test failed

Can you please provide some advise?

cheers

Answer

user2707389 picture user2707389 · Feb 9, 2015

That is a very wide question with a lot of resources available. However, I will recommend py.test because getting started is very easy despite having a full set of tools. Nose has a bit more configuration needed than py.test before starting. Unittest is like junit in java, which is not a bad place to start. Anyway, I recommend py.test.