-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for pytest-8.0.0 compatibility (#8686)
* test_dataset: remove incorrect pytest.warns() to fix pytest-8 Remove two incorrect `pytest.warns()` assertions to fix test failures with pytest-8.0.0. Prior to this version, an exception raised would cause `pytest.warns()` to be ignored. This way fixed in 8.0.0, and now warnings must actually be emitted prior to the exception. In `test_drop_index_labels()`, the exception is raised at the very beginning of the function, prior to the deprecation warning. In `test_rename_multiindex()`, the warning is not emitted at all (it is not applicable to the call in question). * test_groupby: Clear recorded warnings for pytest-8 compatibility Clear the warnings recorded during the `pytest.warns()` use in `test_groupby_dims_property`, to fix test failures with pytest-8.0.0. Prior to this version, `pytest.warns()` invocation used to capture all warnings. Now it only captures the warnings that match the arguments, and the remaining warnings are re-emitted and therefore caught by `recwarn` fixture. To provide compatibility with both versions of pytest, clear the recorded warnings immediately after `pytest.warns()`. Fixes #8681 * Revert "Fix CI: temporary pin pytest version to 7.4.* (#8682)" This reverts commit b0b5b2f. The tests should be fixed now.
- Loading branch information
Showing
9 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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