-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed importError to ModuleNotFoundError (#12220)
* Changed importError to ModuleNotFoundError * added testing for importorskip * added exc_types parameter in importorskip * Added warning and Test Cases * Improve tests and docs * Improve deprecation docs * Change exc_type to kw only * Apply suggestions from code review Co-authored-by: Florian Bruhin <[email protected]> * Fix check --------- Co-authored-by: Bruno Oliveira <[email protected]> Co-authored-by: Florian Bruhin <[email protected]>
- Loading branch information
1 parent
fafab1d
commit 4eb8b6d
Showing
4 changed files
with
168 additions
and
3 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,5 @@ | ||
:func:`pytest.importorskip` will now issue a warning if the module could be found, but raised :class:`ImportError` instead of :class:`ModuleNotFoundError`. | ||
|
||
The warning can be suppressed by passing ``exc_type=ImportError`` to :func:`pytest.importorskip`. | ||
|
||
See :ref:`import-or-skip-import-error` for details. |
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