All Projects β†’ nose-devs β†’ Nose2

nose-devs / Nose2

Licence: other
The successor to nose, based on unittest2

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects
python2
120 projects

Projects that are alternatives of or similar to Nose2

Wasmite
Now WebAssembly has proper testing, unit-testing and debugging πŸ€—
Stars: ✭ 20 (-96.99%)
Mutual labels:  unittest, testing-tools, testing-framework
MockDataGenerator
Generate mock data for POCO
Stars: ✭ 12 (-98.2%)
Mutual labels:  unittest, testing-tools
testkube
☸️ Kubernetes-native framework for test definition and execution
Stars: ✭ 172 (-74.14%)
Mutual labels:  testing-tools, testing-framework
Awesome Unit Testing Swift
A curated collection of awesome blog articles, books, talks, podcasts, tools/frameworks and examples.
Stars: ✭ 272 (-59.1%)
Mutual labels:  testing-tools, testing-framework
tsioc
AOP, Ioc container, Boot framework, unit testing framework , activities workflow framework.
Stars: ✭ 15 (-97.74%)
Mutual labels:  unittest, unit-test
JUnitPerf
API performance testing framework built using JUnit
Stars: ✭ 48 (-92.78%)
Mutual labels:  unittest, testing-tools
sbml-test-suite
The SBML Test Suite is a conformance testing system. It allows developers and users to test the degree and correctness of the SBML support provided in a software package.
Stars: ✭ 21 (-96.84%)
Mutual labels:  testing-tools, testing-framework
kheera-testrunner-android
BDD Framework for Android
Stars: ✭ 18 (-97.29%)
Mutual labels:  testing-tools, testing-framework
Ward
A modern Python test framework designed to help you find and fix flaws faster.
Stars: ✭ 350 (-47.37%)
Mutual labels:  testing-framework, unit-test
Testfx
MSTest V2 framework and adapter
Stars: ✭ 391 (-41.2%)
Mutual labels:  testing-tools, unittest
Karate
Test Automation Made Simple
Stars: ✭ 5,497 (+726.62%)
Mutual labels:  testing-tools, testing-framework
deckard
DNS test harness
Stars: ✭ 28 (-95.79%)
Mutual labels:  testing-tools, testing-framework
Httptest
Qiniu httptest utilities
Stars: ✭ 571 (-14.14%)
Mutual labels:  testing-tools, unit-test
op-test
Testing Firmware for OpenPOWER systems
Stars: ✭ 30 (-95.49%)
Mutual labels:  testing-tools, testing-framework
karate-runner
VSCode Extension for Karate
Stars: ✭ 23 (-96.54%)
Mutual labels:  testing-tools, testing-framework
SpecTools
Write less test code with this set of spec tools. Swift, iOS, testing framework independent (but works well with Quick/Nimble or directly).
Stars: ✭ 38 (-94.29%)
Mutual labels:  testing-tools, testing-framework
pytest-spark
pytest plugin to run the tests with support of pyspark
Stars: ✭ 65 (-90.23%)
Mutual labels:  unittest, unit-test
qiniutest
Qiniu httptest tool: qiniutest
Stars: ✭ 36 (-94.59%)
Mutual labels:  testing-tools, unit-test
Utest.h
πŸ§ͺ single header unit testing framework for C and C++
Stars: ✭ 315 (-52.63%)
Mutual labels:  testing-framework, unit-test
Selenium Wire
Extends Selenium's Python bindings to give you the ability to inspect requests made by the browser.
Stars: ✭ 531 (-20.15%)
Mutual labels:  testing-tools, testing-framework

.. image:: https://github.com/nose-devs/nose2/workflows/build/badge.svg?event=push :alt: build status :target: https://github.com/nose-devs/nose2/actions?query=workflow%3Abuild

.. image:: https://img.shields.io/pypi/v/nose2.svg :target: https://pypi.org/project/nose2/ :alt: Latest PyPI version

.. image:: https://img.shields.io/pypi/pyversions/nose2.svg :alt: Supported Python Versions :target: https://pypi.org/project/nose2/

.. image:: https://img.shields.io/badge/Mailing%20list-discuss%40nose2.io-blue.svg :target: https://groups.google.com/a/nose2.io/forum/#!forum/discuss :alt: Join [email protected]

Welcome to nose2

nose2 is the successor to nose.

It's unittest with plugins.

nose2 is a new project and does not support all of the features of nose. See differences_ for a thorough rundown.

nose2's purpose is to extend unittest to make testing nicer and easier to understand.

nose2 vs pytest

nose2 may or may not be a good fit for your project.

If you are new to python testing, we encourage you to also consider pytest_, a popular testing framework.

Quickstart

Because nose2 is based on unittest, you can start from the Python Standard Library's documentation for unittest <https://docs.python.org/library/unittest.html>_ and then use nose2 to add value on top of that.

nose2 looks for tests in python files whose names start with test and runs every test function it discovers.

Here's an example of a simple test, written in typical unittest style:

.. code-block:: python

# in test_simple.py
import unittest

class TestStrings(unittest.TestCase):
    def test_upper(self):
        self.assertEqual("spam".upper(), "SPAM")

You can then run this test like so::

$ nose2 -v
test_upper (test_simple.TestStrings) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.000s

OK

However, nose2 supports more testing configuration and provides more tools than unittest on its own.

For example, this test exercises just a few of nose2's features:

.. code-block:: python

# in test_fancy.py
from nose2.tools import params

@params("Sir Bedevere", "Miss Islington", "Duck")
def test_is_knight(value):
    assert value.startswith('Sir')

and then run this like so::

$ 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)

Full Docs

Full documentation for nose2 is available at docs.nose2.io_

Contributing

If you want to make contributions, please read the contributing_ guide.

.. _differences: https://nose2.readthedocs.io/en/latest/differences.html

.. _pytest: http://pytest.readthedocs.io/en/latest/

.. _contributing: https://github.com/nose-devs/nose2/blob/master/contributing.rst

.. _docs.nose2.io: https://docs.nose2.io/en/latest/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].