You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering whether there is a more high-level way of skipping whole test files due to failing imports than pytest.importorskip.
The reason that I'd need such a "global" option is twofold:
I have tests that can fail due to missing imports in imported dependencies, which makes it tedious to capture those in the test files themselves using importorskip.
I have flake8 and isort pre-commit hooks enforcing all imports being at the top of the file, so I'd need to exempt all files using importorskip from those hooks. As I need to put importorskip before importing the dependencies that might fail due to those missing imports.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm wondering whether there is a more high-level way of skipping whole test files due to failing imports than
pytest.importorskip
.The reason that I'd need such a "global" option is twofold:
importorskip
.importorskip
from those hooks. As I need to putimportorskip
before importing the dependencies that might fail due to those missing imports.Beta Was this translation helpful? Give feedback.
All reactions