-
Notifications
You must be signed in to change notification settings - Fork 262
TEST: Suppress expected warnings #949
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
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
f0ab879
TEST: Suppress expected warnings
effigies 2f461be
FIX: Avoid/suppress expected warnings
effigies d4f2216
FIX: Bad deprecate_with_version calls
effigies f879473
PY36: Backport nullcontext
effigies 8903f0b
DOCTEST: Suppress deprecation warnings in doctests of deprecated methods
effigies c7fad2e
TEST: Suppress warnings in freesurfer
effigies 7acde5a
MNT: Add pytest-doctestplus to ignore warnings in doctests
effigies 72fa2d2
TEST: Suppress and check warnings in streamlines
effigies 470995d
TEST: Use get_fdata, check for expected warning
effigies dc36a28
RF: Drop calls to deprecated get_affine()
effigies 86b8f6c
FIX: Escape backslashes before parsing strings
effigies 3694a9a
MNT: Reset deprecation clock
effigies 963aee4
FIX: Remove doubled-up fix for divide-by-zero warning
effigies 786cf99
TEST: Small cleanups
effigies 0634da4
FIX: Construct sliceobj from object array; addresses numpy deprecatio…
effigies 27146c6
TEST: Use skipIf rather than warn + return for test_multiload
effigies dae2f86
TEST: Check import-time warnings on modules via conftest
effigies 36a1adf
TEST: Use matches or comments to make clear expected warnings
effigies 4707222
TEST: Unused imports
effigies f1bfc39
TEST: Simplify lazy_load conditional warning check
effigies 1dc4e8d
Update nibabel/streamlines/tests/test_tck.py
effigies File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pytest | ||
|
||
# Pre-load deprecated modules to avoid cluttering warnings | ||
with pytest.deprecated_call(): | ||
import nibabel.keywordonly | ||
with pytest.deprecated_call(): | ||
import nibabel.trackvis | ||
with pytest.warns(FutureWarning): | ||
import nibabel.py3k | ||
|
||
# Ignore warning requesting help with nicom | ||
with pytest.warns(UserWarning): | ||
import nibabel.nicom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one seems like a reasonable fix, but it should get @matthew-brett's or @moloney's eyes to be sure. Previously the line:
Resulted in
ast.parse()
emitting: