-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from jGaboardi/GL81_reduce_warnings
resolve all warnings from CI -- [2024-09-02]
- Loading branch information
Showing
4 changed files
with
118 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# ----- IMPORTANT ----- | ||
# See GL#80 & GL#81 | ||
# This file can be deleted once ``_indices.py`` is fully removed. | ||
|
||
import pytest | ||
|
||
def warning_depr(x): | ||
return pytest.warns( | ||
FutureWarning, match=f"{x} is deprecated and will be removed on 2025-01-01." | ||
) | ||
|
||
def warning_invalid(x): | ||
return pytest.warns(RuntimeWarning, match=f"invalid value encountered in {x}") | ||
|
||
warning_div_zero = pytest.warns(RuntimeWarning, match="divide by zero encountered") | ||
|
||
|
||
def pytest_configure(config): | ||
pytest.warning_depr = warning_depr | ||
pytest.warning_invalid = warning_invalid | ||
pytest.warning_div_zero = warning_div_zero | ||
|
||
|
||
def pytest_ignore_collect(collection_path): | ||
return True if str(collection_path).endswith("_indices.py") else False | ||
|
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