5

I am starting on my first large scale python project and I want to put the right testing package in place not only to get the job done but also so when hiring people down the road it's easy to find developers familiar with it.

I am curious what python unit testing packages are available and what their community adoption rates are, but I particularly want to know the advantages and disadvantages of them so I can make the best choice for my project.

  • A simple google query would answer this - pyunit/unittest, pytest, and nose are the three biggest players . . . – ernie Mar 17 '17 at 16:43
  • 1
    Edit to make less opinion-based – Kate Paulk Jun 8 '17 at 12:14
6

Nose is no longer maintained:

Nose has been in maintenance mode for the past several years and will likely cease without a new person/team to take over maintainership. New projects should consider using Nose2, py.test, or just plain unittest/unittest2.

Even though unittest from the Python standard library is a very mature test framework with built-in test runner and test discovery capabilities, the biggest player in the Python testing world is currently pytest framework.

pytest is actively developed and maintained. It is compatible with both unittest and nose test suites, has built-in test discovery and has a rich set of 150+ plugins.

There is also a fresh book on pytest, check it out:

2

what python unit testing packages are available and what their community adoption rates are.

Very interesting question, it will be hard to provide a precious answer on their adoption rates, but from my personal experience, python unit testing frameworks on the markets are:

The three test frameworks should provide you with enough to cover any testing project.

  • 1
    Okay, so unittest seems to be updated to support every new version of python, but TestOOB's code is very stale. The site is dated 2006 and the github repo hasn't been modified since 2011. Similarly, the Nose site is dated 2006 and the github repo hasn't been modified in over a year. Although, the unittest docs do name Nose as an alternative. – wogsland Mar 17 '17 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.