Decorator to skip test when at least one of `commands` is not found.
(*commands)
| 361 | |
| 362 | |
| 363 | def onlyif_cmds_exist(*commands): |
| 364 | """ |
| 365 | Decorator to skip test when at least one of `commands` is not found. |
| 366 | """ |
| 367 | for cmd in commands: |
| 368 | if not shutil.which(cmd): |
| 369 | return skip("This test runs only if command '{0}' " |
| 370 | "is installed".format(cmd)) |
| 371 | return null_deco |
| 372 | |
| 373 | def onlyif_any_cmd_exists(*commands): |
| 374 | """ |