Skip to content

Sprint: Pytest conversion #864

Closed
@effigies

Description

@effigies

Tasks

Some principles:

  • Try to avoid numpy test methods and decorators when a vanilla unittest/pytest construct exists. NOTABLE EXCEPTIONS: Tools for comparing arrays and floating points, such as assert_almost_equal.
  • Clear is better than brief.
  • ...

Original post follows:


Summary

nose is finally going to start failing on Python 3.9 due to some standard library API changes.

Python 3.9.0 is due to be released in October, but we might as well get out ahead of it. We don't need to rush, so I'm going to target the nibabel 3.1.0 release.

I put out a call on Twitter to see if anybody wanted to sprint on this, and got responses from @arokem, @chrisgorgo, @orduek, @robbisg and @anibalsolon (thanks to all for having the same handle on GitHub and Twitter).

This thread exists to coordinate the sprint.

Status

@djarecka and @chrisgorgo started on conversion in November:

There have been some changes in the tests since #840 was started, so it requires merging/rebasing.

Plans

To facilitate the transition, I've started the pytest branch, which is #840's commits, rebased on master.

The first thing to do is to identify all remaining tasks. Off the top of my head we need to:

  1. Eliminate the use of nose.tools.
  2. Move any nose test case classes to vanilla unittest features, which pytest should be able to handle transparently.
  3. Verify coverage doesn't change/increases.
  4. Run doctests in the documentation with pytest.

Logistics

Let's set at least one definite window that people want to be actively working on this and where I can commit to being more responsive to keep things from stalling out. We don't all need to align, but it would probably be best for me if there isn't a separate window for each participant.

Would it be useful to attempt to do this (semi-)synchronously, and use a chat room? Or would people rather go through the usual process of creating issues and pull requests?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions