Skip to content

Commit 81cfed2

Browse files
committed
Use shutil.which instead of deprecated function from distutils
1 parent 554b393 commit 81cfed2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_pytest_cpp.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import subprocess
22
import sys
33
import tempfile
4+
from shutil import which
45

56
import pytest
6-
from distutils.spawn import find_executable
77

88
from pytest_cpp import error
99
from pytest_cpp.boost import BoostTestFacade
@@ -451,7 +451,7 @@ def test_argument_option_priority(testdir, exes):
451451

452452

453453
@pytest.mark.skipif(
454-
not find_executable("valgrind") or not find_executable("catchsegv"),
454+
not which("valgrind") or not which("catchsegv"),
455455
reason="Environment does not have required tools",
456456
)
457457
def test_google_cpp_harness_via_option(testdir, exes):
@@ -504,7 +504,7 @@ def test_boost_two_arguments_via_option(testdir, exes):
504504

505505

506506
@pytest.mark.skipif(
507-
not find_executable("valgrind") or not find_executable("catchsegv"),
507+
not which("valgrind") or not which("catchsegv"),
508508
reason="Environment does not have required tools",
509509
)
510510
def test_boost_cpp_harness_via_option(testdir, exes):

0 commit comments

Comments
 (0)