Repolode
nose-devs

nose-devs/nose2

A Python test runner that extends unittest with plugins, test discovery, parameterized tests and richer output, successor to nose.

Stars
829
Forks
139
Open issues
46
Last commit
2 days ago

What is it?

nose2 is a Python test runner built on top of the standard library's unittest module. It finds test files whose names start with "test" and runs both unittest-style test cases and plain test functions, so existing unittest suites can run without modification.

Beyond unittest, nose2 adds tools such as the params decorator for parameterized tests and a pretty-assert option that shows detailed values when an assertion fails. Its behavior is configurable and extensible through plugins.

nose2 is a distinct project from nose and does not support every nose behavior. The project notes that pytest is a widely used alternative with a larger community.

Key features

  • 01Discovers and runs unittest test cases and plain test functions in files named test*.py.
  • 02Provides the params decorator for parameterized tests.
  • 03Offers a --pretty-assert option that shows detailed values on assertion failures.
  • 04Extends behavior through a plugin system.
  • 05Requires Python 3 and supports current CPython releases.

Use cases

  • Running an existing unittest-based Python project with more discovery and configuration options.
  • Writing parameterized tests without adding a third-party framework.
  • Migrating legacy projects that used nose to a maintained successor.

Quick start

  1. 1

    Write a simple unittest-style test file

  2. 2

    Run the tests with verbose output

    nose2 -v

Things to know

  • Does not support all of nose's behaviors, so it is not a drop-in replacement for nose.
  • Has a smaller maintainer team and community than pytest.
  • Python 2 is no longer supported.

In collections

Topics

#python#testing#unittest#test-runner#unit-test#library#nose#nose2#nosetest#nosetests

FAQ

What is nose2?
A Python test runner that extends unittest with plugins, test discovery, parameterized tests and richer output, successor to nose. nose2 is a Python test runner built on top of the standard library's unittest module. It finds test files whose names start with "test" and runs both unittest-style test cases and plain test functions, so existing unittest suites can run without modification.
Is nose2 free to use? What license does it have?
nose2 is open source under the Other license. Check the license terms before using it in commercial products.
Is nose2 still maintained?
Actively maintained. The last commit to nose2 was on Nov 5, 2026.
What can I use nose2 for?
Running an existing unittest-based Python project with more discovery and configuration options. Writing parameterized tests without adding a third-party framework. Migrating legacy projects that used nose to a maintained successor.
How do I install nose2?
Write a simple unittest-style test file Run the tests with verbose output: nose2 -v
Where can I get nose2?
The source code and installation instructions are on GitHub: https://github.com/nose-devs/nose2

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects