Skip to content

TEST: Final nose purge #891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 19, 2020
Merged

Conversation

effigies
Copy link
Member

We missed a couple modules:

  • nibabel.streamlines.tests
  • nibabel.nicom.tests.test_dwiparams

This PR also removes the nosetests extra and the nosetests checks from Travis and Azure.

With the removal of these tests, we can remove the numpy printoptions code in nibabel.__init__.py.

Further, the numpy.testing.NoseTester is nose-specific, so I rewrote nibabel.test() and nibabel.bench() to use Pytest. This can be refactored further in the future if it seems worth it. To make pytest play nicely with benchmarks, I added a config file that will be part of the package.

This is best reviewed commit-by-commit.

@codecov
Copy link

codecov bot commented Feb 18, 2020

Codecov Report

Merging #891 into pytest will decrease coverage by 0.26%.
The diff coverage is 6.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           pytest     #891      +/-   ##
==========================================
- Coverage   91.56%   91.29%   -0.27%     
==========================================
  Files          96       96              
  Lines       12077    12065      -12     
  Branches     2175     2173       -2     
==========================================
- Hits        11058    11015      -43     
- Misses        683      716      +33     
+ Partials      336      334       -2
Impacted Files Coverage Δ
nibabel/__init__.py 53.73% <6.06%> (-40.27%) ⬇️
nibabel/minc2.py 89.74% <0%> (-4.65%) ⬇️
nibabel/volumeutils.py 83.82% <0%> (-0.2%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8db1cd9...154b941. Read the comment docs.

@effigies effigies mentioned this pull request Feb 18, 2020
37 tasks
@anibalsolon
Copy link
Collaborator

For minc2.py and volumeutils.py, is there any reason for the decrease of coverage? Maybe some raised exception not catch by pytest.

For the rest, LGTM!

@djarecka
Copy link
Collaborator

lgtm

but just a couple more things:

  • this should not be needed
  • we are not running test for nisext anymore, and the test are using nose.
  • is this still needed?

I was also wondering should we try to remove clear_and_catch_warnings, error_warnings, etc. from testing (we removed many usage from the tests but not all), but this is just a question.

@effigies
Copy link
Member Author

@anibalsolon For coverage losses, I think it's mostly that Codecov is a bit spazzy. There's very often a little +/- that happens with a given PR. We can check #865's coverage report before a final merge to see if there's anything concerning.

@djarecka

  1. I decided to keep bisect_nose for now. It can still be used, even if it's not supported. Might be good to write a similar tool for pytest.
  2. For nisext, we should probably open an issue for some kind of official deprecation and removal. I'm not sure if anybody uses it.
  3. Yes. It will hit for Windows or any system that doesn't have fuse installed.

@effigies effigies merged commit 3a38200 into nipy:pytest Feb 19, 2020
@effigies effigies deleted the test/final_nose_purge branch February 19, 2020 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants