PyNose

1.5.5 · active · verified Sun Apr 12

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.

Warnings

Install

Imports

Quickstart

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

view raw JSON →