I'm about to use nose as a method for test discovery on my already implemented unittest classes in my rather large project. I was under the impression that nose is just used primarily for test discovery and test running (in parallel as well). But I see this question as if nose is a replacement for unittest. Can someone clarify what they meant here? Am I missing some core piece of functionality that nose provides?
As a side note, what is the difference between py.test and nose?
The docs for nose say:
nose provides an alternate test discovery and running process for unittest, one that is intended to mimic the behavior of py.test as much as is reasonably possible without resorting to too much magic.
If you take a peek at the code, you will see that unittest is one of the dependencies.
import logging
import sys
import unittest
So - to the best of my knowledge - I would say that nose is a drop-in alternative for running tests, but not an replacement to the unittest module (playing a bit with the semantics here, but I hope this is clear enough).
Nose mimics behavior of py.test. That's what they say on their website:
nose provides an alternate test discovery and running process for unittest, one that is intended to mimic the behavior of py.test as much as is reasonably possible without resorting to too much magic
Nose is an extension of unittest and adds the features listed in issue https://stackoverflow.com/questions/5696884/python-nose-vs-unittest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With