debian-forge/osbuild/testutil/__init__.py
Simon de Vlieger 1f51938046 osbuild: testutil provides has_executable
Add a helper function to determine if an executable is on PATH.
2023-11-10 12:03:23 +01:00

8 lines
140 B
Python

"""
Test related utilities
"""
import shutil
def has_executable(executable: str) -> bool:
return shutil.which(executable) is not None