You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/nbconvert/tests/utils.py

13 lines
366 B

import pytest
from shutil import which
def onlyif_cmds_exist(*commands):
"""
Decorator to skip test when at least one of `commands` is not found.
"""
for cmd in commands:
if not which(cmd):
return pytest.mark.skip("This test runs only if command '{0}' "
"is installed".format(cmd))
return lambda f: f