osbuild: testutil provides has_executable
Add a helper function to determine if an executable is on PATH.
This commit is contained in:
parent
be85b2342c
commit
1f51938046
1 changed files with 5 additions and 0 deletions
|
|
@ -1,3 +1,8 @@
|
|||
"""
|
||||
Test related utilities
|
||||
"""
|
||||
import shutil
|
||||
|
||||
|
||||
def has_executable(executable: str) -> bool:
|
||||
return shutil.which(executable) is not None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue