Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create skip_if_no helper function to skip tests when missing a package #2883

Merged
merged 2 commits into from
Dec 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove mention of version check
Co-Authored-By: Dongdong Tian <[email protected]>
  • Loading branch information
weiji14 and seisman committed Dec 16, 2023
commit fcf400ee7e136c63a3cde1379de8c9efdbf2caf5
5 changes: 2 additions & 3 deletions pygmt/helpers/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,8 @@ def skip_if_no(package):
fixtures. Use pytest.importorskip if an imported moduled is later needed
or for test functions.

If the import and version check are unsuccessful, then the test function
(or test case when used in conjunction with parametrization) will be
skipped.
If the import is unsuccessful, then the test function (or test case when
used in conjunction with parametrization) will be skipped.

Adapted from
https://github.com/pandas-dev/pandas/blob/v2.1.4/pandas/util/_test_decorators.py#L121
Expand Down