Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba8924b commit 935cd31Copy full SHA for 935cd31
1 file changed
IPython/testing/decorators.py
@@ -376,9 +376,14 @@ def onlyif_cmds_exist(*commands):
376
Decorator to skip test when at least one of `commands` is not found.
377
"""
378
for cmd in commands:
379
+ reason = "This test runs only if command '{cmd}' is installed"
380
if not shutil.which(cmd):
- return skip("This test runs only if command '{0}' "
381
- "is installed".format(cmd))
+ if os.environ.get("IPTEST_WORKING_DIR", None) is not None:
382
+ return skip(reason)
383
+ else:
384
+ import pytest
385
+
386
+ return pytest.mark.skip(reason=reason)
387
return null_deco
388
389
def onlyif_any_cmd_exists(*commands):
0 commit comments