Skip to content

Simplify the testing infrastructure for checking warnings #343

Closed
@bcipolli

Description

@bcipolli

In implementing #329, I've hit the need to check warnings. I believe nibabel has two different codepaths for manipulating warnings:

  • nibabel.checkwarns - has classes ErrorWarnings and IgnoreWarnings
  • nibabel.testing - has classes suppress_warnings and catch_warn_reset

I'd like to combine these into a single place, with a single methodology. I believe creating a CheckWarnings class, that mirrors catch_warn_reset, and eliminating the warning classes from nibabel.testing, may be the best?

@matthew-brett any advice? I'd like to resolve this one before completing #329 , if that's cool. I have time to do it today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions