Skip to content

TEST: Drop nose for pytest #865

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 246 commits into from
Feb 24, 2020
Merged

TEST: Drop nose for pytest #865

merged 246 commits into from
Feb 24, 2020

Conversation

effigies
Copy link
Member

@effigies effigies commented Jan 25, 2020

This PR exists to make all changes related to #864 easy to view, and makes CI status more visible.

Closes #864.
Replaces #840.

@codecov
Copy link

codecov bot commented Jan 25, 2020

Codecov Report

Merging #865 into master will increase coverage by 2.29%.
The diff coverage is 96.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #865      +/-   ##
==========================================
+ Coverage   89.34%   91.63%   +2.29%     
==========================================
  Files          96       96              
  Lines       12378    12062     -316     
  Branches     2184     2173      -11     
==========================================
- Hits        11059    11053       -6     
+ Misses        970      677     -293     
+ Partials      349      332      -17
Impacted Files Coverage Δ
nibabel/optpkg.py 97.05% <100%> (+7.31%) ⬆️
nibabel/testing/helpers.py 100% <100%> (ø)
nibabel/__init__.py 100% <100%> (+6%) ⬆️
nibabel/testing/__init__.py 100% <100%> (+1.92%) ⬆️
nibabel/conftest.py 100% <100%> (ø)
nibabel/pydicom_compat.py 92% <50%> (+28.36%) ⬆️
nibabel/filebasedimages.py 84.61% <0%> (-1.2%) ⬇️
nibabel/dataobj_images.py 93.1% <0%> (-0.65%) ⬇️
nibabel/ecat.py 87.7% <0%> (-0.37%) ⬇️
nibabel/gifti/gifti.py 95.08% <0%> (-0.35%) ⬇️
... and 45 more

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 c2a8b52...5657d01. Read the comment docs.

@effigies effigies force-pushed the pytest branch 2 times, most recently from a7eb937 to 2de4052 Compare January 25, 2020 19:40
Copy link
Member Author

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a read-through of all of this. Most things look reasonable. I had a few comments mostly on alternative idioms we can try moving to.

assert_equal(func.__doc__, 'foo\n')
assert func() == None
assert len(w) == 1
assert w[0].category is DeprecationWarning
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This general form of:

with clear_and_catch_warnings(...) as w:
    warnings.simplefilter('always')
    # call
    assert len(w) == 1
    assert w[0].category is DeprecationWarning

can be replaced with:

with pytest.deprecated_call():
    assert func() == None

with pytest.raises(AttributeError):
rc.__getattribute__('label')

def test_recoder_3():
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doubled up. We might be masking the first one of these...

@djarecka
Copy link
Collaborator

@effigies - thanks for reviewing, I'll address the comments and change the code before Tue

@effigies
Copy link
Member Author

@djarecka I just wanted to establish a baseline status. I'm okay with using this as a starting point and divvying up jobs on Tuesday.

Of course, feel free to push on anything you like before then.

@effigies effigies mentioned this pull request Feb 19, 2020
@effigies effigies changed the title [WIP] TEST: Drop nose for pytest TEST: Drop nose for pytest Feb 19, 2020
effigies pushed a commit to effigies/nibabel that referenced this pull request Feb 20, 2020
effigies pushed a commit to effigies/nibabel that referenced this pull request Feb 20, 2020
@effigies
Copy link
Member Author

Hi all, this is ready, as far as I'm concerned. There are further things that we can do, but the task of removing the dependency on nose is done, so my inclination is to get it merged, and let any further work be done against master, rather than pytest.

There's a slightly weird issue where the def <func>(): lines aren't getting covered, and that's probably a result of using --pyargs to test the installed version rather than directly testing the source. I'm not sure fiddling with this is a great use of time.

What do y'all think? Anything you see as hold-ups?

@effigies
Copy link
Member Author

Okay. I'm doing it. Thanks all for sprinting on this with me!

@effigies effigies merged commit d9298ed into master Feb 24, 2020
@effigies effigies deleted the pytest branch February 24, 2020 13:43
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.

Sprint: Pytest conversion
5 participants