Registry / testing / pynose

pynose

JSON →
library1.5.5pypypi✓ verified 24d ago

PyNose is an updated version of the `nose` testing framework, designed to extend `unittest` and simplify Python testing. It aims to fix compatibility issues with newer Python versions and improve upon the original `nose` project. As of version 1.5.5, it supports Python 3.7+ (including 3.14+). It has an active release cadence, with several updates addressing compatibility and adding features recently.

pip install pynose
INSTALL
IMPORT
SIG · PYNOSE
P
pynose
testingpythonv1.5.5
Install
1.6s avg
Import
204ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.5.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.220s · 18.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.188s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

nose.main
import nose # Then call nose.main() or nose.run()
When `pynose` is installed, it occupies the `nose` namespace, making `import nose` refer to PyNose's functionality. The primary usage is typically via the `pynose` or `nosetests` command-line executables.

Create a test file (e.g., `test_example.py`). PyNose automatically discovers tests in files or directories whose names include 'test' or 'Test'. You can run tests using the `pynose` or `nosetests` command from your terminal.

# test_example.py import unittest class MyTestCase(unittest.TestCase): def test_addition(self): self.assertEqual(1 + 1, 2) def test_subtraction(self): self.assertEqual(2 - 1, 1) def test_simple_function(): assert True # To run these tests from the command line, save this file # and then execute 'pynose' or 'nosetests' in your terminal. # Example: pynose test_example.py
nosetests --version
Debug
Known issues
breakingPyNose v1.5.0 dropped official support for Python 3.6. Users on Python 3.6 or older must upgrade their Python environment to at least 3.7 or use an older version of PyNose.
fix
Upgrade Python to 3.7 or newer, or pin PyNose to a version < 1.5.0.
affects: >=1.5.0
gotchaUnlike legacy `nose` which captured `stdout` by default (hiding `print()` output), PyNose (from v1.4.8 onwards) makes `print()` output visible by default (equivalent to `nose -s`). To suppress `print()` output, use the `--capture-output` command-line option.
fix
If `print()` output is undesired, use `pynose --capture-output` or `nosetests --capture-output`. If `print()` output is missing in older versions, use `pynose -s`.
affects: >=1.4.8
gotchaPyNose automatically skips tests that utilize `pytest` fixtures. This can lead to tests not being run as expected if a project mixes `nose`-style tests with `pytest` fixture-based tests.
fix
Ensure test files conform to `nose`-style testing or adjust your test runner to `pytest` if `pytest` fixtures are predominantly used.
affects: All versions
deprecatedThe use of multiple `-w` arguments to specify working directories for test discovery is deprecated and will be removed in a future release.
fix
Consolidate your test paths or adjust your test discovery strategy to use a single `-w` argument if possible, or rely on automatic discovery from the current working directory.
affects: All versions
gotchaPyNose is a modern replacement for the abandoned `nose` project. While largely a drop-in, projects migrating directly from original `nose` might encounter subtle differences in behavior or unsupported `nose` idioms (e.g., specific `sys.path` manipulations, certain `nose`-style doctests, or `yield`-based methods) that were part of the legacy implementation.
fix
Test your migrated suite thoroughly. Consult the PyNose GitHub page for details on specific fixes and changes compared to the original `nose`.
affects: All versions (when migrating from legacy `nose`)
Errors
Common errors & fixes
AttributeError: module 'collections' has no attribute 'Callable'
This error typically occurs when using the outdated `nose` testing framework with newer Python versions (3.10+), as `collections.Callable` was deprecated and removed.
fix
Install `pynose`, which is a maintained fork compatible with modern Python versions: `pip install pynose`. When `pynose` is installed, it occupies the `nose` namespace, allowing you to use `import nose` or the `nosetests` command.
ImportError: cannot import name '_TextTestResult' from 'unittest'
This error arises when the legacy `nose` framework attempts to import an internal `unittest` class (`_TextTestResult`) that has been moved or removed in newer Python versions (e.g., Python 3.10+).
fix
Upgrade to `pynose`, which addresses this compatibility issue and provides an updated version of the `nose` framework: `pip install pynose`.
nosetests: command not found
This error indicates that the `nosetests` command-line entry point is not available in your system's PATH. This often happens if the `nose` package (which is outdated and incompatible with modern Python) was installed, or if `pynose` was installed but its executable scripts are not in a directory included in your shell's PATH.
fix
Ensure `pynose` is installed in your active Python environment: `pip install pynose`. If the issue persists, verify your PATH configuration or try running tests directly via Python: `python -m nose` (which will execute pynose if installed).
ModuleNotFoundError: No module named 'nose'
This error occurs when the Python interpreter cannot find the `nose` module, which means `pynose` (which provides the `nose` module) is not installed in the currently active Python environment, or there's an issue with the Python environment's module search path.
fix
Install `pynose` using pip: `pip install pynose`. If you have multiple Python versions or virtual environments, ensure `pip` corresponds to the Python interpreter you are using for your project.
Upgrade
Version history
1.5.5latest on PyPI · released Sep 8, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
pynose — pip install pynose · libregistry