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 <me@the-compiler.org> * Fix check --------- Co-authored-by: Bruno Oliveira <bruno@soliv.dev> Co-authored-by: Florian Bruhin <me@the-compiler.org>
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user