nose2: The Successor to nose, Based on unittest2
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
nose2 is a powerful testing framework for Python, designed as the successor to the popular nose project. Built upon Python's standard `unittest` module, it extends its capabilities to provide a more flexible and feature-rich testing experience. It aims to make writing and running tests in Python simpler and more efficient.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
nose2 is a robust testing framework for Python, serving as the official successor to the widely-used nose project. Built directly on Python's standard unittest module, nose2 extends its functionalities to offer a more flexible and feature-rich environment for writing and executing tests. Its primary goal is to simplify the testing process, making it more intuitive and powerful for Python developers. While pytest is a popular alternative for new projects, nose2 provides a strong, unittest-based solution, especially for those familiar with or migrating from nose.
Installation
Getting started with nose2 is straightforward. You can install it using pip:
pip install nose2
Examples
nose2 automatically discovers tests in Python files whose names start with test_ and runs every test function it finds.
Here's a basic example written in the standard unittest style:
# in test_simple.py
import unittest
class TestStrings(unittest.TestCase):
def test_upper(self):
self.assertEqual("spam".upper(), "SPAM")
You can run this test from your terminal:
$ nose2 -v
test_upper (test_simple.TestStrings) ... ok
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK
nose2 also provides additional tools and features beyond what unittest offers. For instance, you can use decorators like @params to run a test with multiple sets of arguments:
# in test_fancy.py
from nose2.tools import params
@params("Sir Bedevere", "Miss Islington", "Duck")
def test_is_knight(value):
assert value.startswith('Sir')
Running this with nose2 -v --pretty-assert demonstrates its enhanced output:
$ nose2 -v --pretty-assert
test_fancy.test_is_knight:1
'Sir Bedevere' ... ok
test_fancy.test_is_knight:2
'Miss Islington' ... FAIL
test_fancy.test_is_knight:3
'Duck' ... FAIL
======================================================================
FAIL: test_fancy.test_is_knight:2
'Miss Islington'
----------------------------------------------------------------------
Traceback (most recent call last):
File "/mnt/ebs/home/sirosen/tmp/test_fancy.py", line 6, in test_is_knight
assert value.startswith('Sir')
AssertionError
>>> assert value.startswith('Sir')
values:
value = 'Miss Islington'
value.startswith = <built-in method startswith of str object at 0x7f3c3172f430>
======================================================================
FAIL: test_fancy.test_is_knight:3
'Duck'
----------------------------------------------------------------------
Traceback (most recent call last):
File "/mnt/ebs/home/sirosen/tmp/test_fancy.py", line 6, in test_is_knight
assert value.startswith('Sir')
AssertionError
>>> assert value.startswith('Sir')
values:
value = 'Duck'
value.startswith = <built-in method startswith of str object at 0x7f3c3172d490>
----------------------------------------------------------------------
Ran 3 tests in 0.001s
FAILED (failures=2)
Why Use nose2?
nose2 offers several compelling reasons for Python developers:
unittestFoundation: It builds upon the familiarunittestmodule, making it easy for developers already usingunittestto transition and leveragenose2's enhancements.- Enhanced Test Discovery: Automatically finds and runs tests, reducing boilerplate configuration.
- Extended Functionality: Provides powerful tools and plugins, such as parameterized tests (
@params) and improved assertion output (--pretty-assert), which go beyond standardunittestcapabilities. - Successor to
nose: For projects migrating from the originalnoseframework,nose2offers a modern and maintained alternative, though with some differences to be aware of. - Active Development: It supports current Python versions (Python 3) and aims to support PyPy and CPython betas.
Links
- GitHub Repository: https://github.com/nose-devs/nose2
- Official Documentation: https://docs.nose2.io/en/latest/
- PyPI Project Page: https://pypi.org/project/nose2/
- Mailing List: https://groups.google.com/a/nose2.io/forum/#!forum/discuss
- Contributing Guide: https://github.com/nose-devs/nose2/blob/main/contributing.rst
- Differences from
nose: https://docs.nose2.io/en/latest/differences.html - Changelog: https://docs.nose2.io/en/latest/changelog.html
Related repositories
Similar repositories that may be relevant next.

AREX-Skill: A Skill Library for Automated Machine Learning and Auto-Research
September 21, 2026
AREX-Skill is a powerful skill library designed to advance automated machine learning and auto-research. It distills over 5,000 executable skills from more than 1,000 popular GitHub repositories, making complex ML knowledge directly usable by coding agents. This project significantly enhances agent performance in various research tasks by providing structured, validated operating knowledge.

oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory
September 17, 2026
oh-my-hermes is an all-in-one plugin designed to significantly enhance the Hermes Agent. It provides advanced coding intelligence, a robust long-term memory system, and optimized workflow packages, transforming standard Hermes requests into structured, actionable tasks with clear operational layers.
ASC: A Super Fast Android Decompiler for Mobile Reverse Engineering
September 17, 2026
ASC is an innovative and exceptionally fast Android decompiler front-end, specifically designed for mobile researchers and agents. It redefines traditional decompilation by directly querying compiled artifacts, offering on-demand code extraction and analysis without heavy preprocessing. This approach results in significantly reduced memory usage and lightning-fast performance, even on large APKs.

Open Index: A Deterministic Memory Layer for Your AI Agents
September 16, 2026
Open Index is a powerful tool for building domain-specific, accurate, and structured data that AI agents can effectively operate on. It enables the creation of a "brain," a searchable and continuously improving context graph tailored to any domain. This system ensures agents have access to reliable, up-to-date information, enhancing their capabilities and decision-making processes.
Source repository
Open the original repository on GitHub.
17 counted GitHub visits