-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
pytest-ification #1828
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
pytest-ification #1828
Changes from 27 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
d4a4283
deprecation notes in testing functions
max-sixty 0695dab
gitignore additions
max-sixty 1ef5f17
self_assert from unittest2pytest
max-sixty 88ab9cc
pytest.warns needs a warning
max-sixty 51c1fd7
assert_equal
max-sixty 7bdb888
future warnings
max-sixty 5e3a857
assert identical
max-sixty 72d3119
pytest warning fix
max-sixty 286c0eb
revert assert_equal, as assert_array_equal needs to be separate
max-sixty 075ad36
assert dataset & dataarray equal
max-sixty b7a086f
imports
max-sixty c06dd48
assertItemsEqual (but may need coercion to sets)
max-sixty 6b67572
Revert "assertItemsEqual (but may need coercion to sets)"
max-sixty c336bbc
add back in assertitemsequal
max-sixty b9dfe05
self.assert_equal -> assert_equal
max-sixty 04cd8a5
pytest.warns message matching
max-sixty c69b6aa
undo backend changes - too many errors
max-sixty 145c013
a few triages
max-sixty 3f286ba
another import
max-sixty 62c22eb
can't deprecate importorskip yet
max-sixty ccfbff3
assert_array_equal
max-sixty 66c9cd6
assert_identical half way in ufuncs
max-sixty 4e32f96
backends merge
max-sixty 71b34f9
lint v1
max-sixty 362ed63
lint v2
max-sixty f94a0a9
autopep8 all the things
max-sixty 2b89cbd
lint final
max-sixty 80b921c
undo some of the yapf crazyness
max-sixty 7e7c71d
@Zac-HD dtype
max-sixty bf60844
remove more yapf overeagerness
max-sixty a78169b
test_ufuncs normal again
max-sixty b1a6766
final lint normalize
max-sixty 1ba00ee
a few left overs
max-sixty aa340ff
xarray-specific functions changed in backends
max-sixty c296f89
undo self.AllClose
max-sixty d2e3d16
remove some old xarray funcs
max-sixty ab59d04
assert_array_equal complete
max-sixty b2cf4e8
remove assertVariable*
max-sixty caed1bd
more parentheses please
max-sixty 3938aa7
install pytest through pip in 3.4 CI
max-sixty ec9d88c
flake8 fails on 3.4 only without this?
max-sixty 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
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 |
---|---|---|
|
@@ -109,6 +109,9 @@ def _importorskip(modname, minversion=None): | |
|
||
|
||
class TestCase(unittest.TestCase): | ||
""" | ||
These functions are all deprecated. Instead, use functions in xr.testing | ||
""" | ||
if PY3: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can remove |
||
# Python 3 assertCountEqual is roughly equivalent to Python 2 | ||
# assertItemsEqual | ||
|
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 should also apply to unsigned integers, and the resulting dtype should be given as a numpy dtype. Plus, we can make this much more efficient for small integers: