Skip to content

[suggest] use pytest instead of nose #604

@chengs

Description

@chengs

The current test cases are running by nose. However, nose is already in the maintenance mode (the newest version is released in 2015).

Also, the developers of nose suggest changing to nose2 or pytest:

Nose has been in maintenance mode for the past several years and will likely cease without a new person/team to take over maintainership. New projects should consider using Nose2, py.test, or just plain unittest/unittest2. https://nose.readthedocs.io/en/latest/

IMHO, pytest is a better choice than nose2.

  1. It's more popular, which means better support. https://github.com/nose-devs/nose2 has 500 stars, while https://github.com/pytest-dev/pytest/ has 3,000 stars.
  2. It has a plugin nbval that can support adding test cases for jupyter notebook seamlessly.
  3. It has a better plugin support, http://plugincompat.herokuapp.com/, some of which we may need in future.

Minor modification on test_*.py may be necessary according to https://docs.pytest.org/en/latest/nose.html#noseintegration

We may consider changing to pytest when dropping the support of python26. Because pytest supports python27+, and python34+

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions