Decorator to skip test unless at least one of `commands` is found.
(*commands)
| 371 | return null_deco |
| 372 | |
| 373 | def onlyif_any_cmd_exists(*commands): |
| 374 | """ |
| 375 | Decorator to skip test unless at least one of `commands` is found. |
| 376 | """ |
| 377 | warnings.warn("The function `onlyif_any_cmd_exists` is deprecated since IPython 4.0", |
| 378 | DeprecationWarning, stacklevel=2) |
| 379 | for cmd in commands: |
| 380 | if shutil.which(cmd): |
| 381 | return null_deco |
| 382 | return skip("This test runs only if one of the commands {0} " |
| 383 | "is installed".format(commands)) |