Bug 1898817 - Replace distutils.spawn.find_executable with shutil.which within mozlint r=ahal

Differential Revision: https://phabricator.services.mozilla.com/D211630
This commit is contained in:
ahochheiden 2024-06-21 17:30:03 +00:00
parent b53b4ccf72
commit 036ddeb0e2

View File

@ -5,7 +5,7 @@
import os
import subprocess
import sys
from distutils.spawn import find_executable
from shutil import which
import mozunit
import pytest
@ -57,7 +57,7 @@ def test_cli_run_with_fix(run, capfd):
assert out.endswith("{}\n")
@pytest.mark.skipif(not find_executable("echo"), reason="No `echo` executable found.")
@pytest.mark.skipif(not which("echo"), reason="No `echo` executable found.")
def test_cli_run_with_edit(run, parser, capfd):
os.environ["EDITOR"] = "echo"