Show More
@@ -353,7 +353,14 b' def onlyif_cmds_exist(*commands):' | |||||
353 | Decorator to skip test when at least one of `commands` is not found. |
|
353 | Decorator to skip test when at least one of `commands` is not found. | |
354 | """ |
|
354 | """ | |
355 | for cmd in commands: |
|
355 | for cmd in commands: | |
356 | if not is_cmd_found(cmd): |
|
356 | try: | |
357 | return skip("This test runs only if command '{0}' " |
|
357 | if not is_cmd_found(cmd): | |
358 | "is installed".format(cmd)) |
|
358 | return skip("This test runs only if command '{0}' " | |
|
359 | "is installed".format(cmd)) | |||
|
360 | except ImportError as e: | |||
|
361 | # is_cmd_found uses pywin32 on windows, which might not be available | |||
|
362 | if sys.platform == 'win32' and 'pywin32' in e.message: | |||
|
363 | return skip("This test runs only if pywin32 and command '{0}' " | |||
|
364 | "is installed".format(cmd)) | |||
|
365 | raise e | |||
359 | return null_deco |
|
366 | return null_deco |
General Comments 0
You need to be logged in to leave comments.
Login now