Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pytest_services/gui.py.orig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import socket
import shlex
import subprocess32

from distutils.spawn import find_executable
from shutil import which
import pytest

from tests.fixtures.services.util import (
Expand Down Expand Up @@ -70,7 +70,7 @@ def xvfb_watcher(
with file_lock(
os.path.join(lock_dir, 'xvfb_{0}.lock'.format(display)),
operation=fcntl.LOCK_EX | fcntl.LOCK_NB):
xvfb = find_executable('Xvfb')
xvfb = which('Xvfb')
assert xvfb, 'You have to have Xvfb installed'
cmd = (
'{xvfb} '
Expand Down
4 changes: 2 additions & 2 deletions pytest_services/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import subprocess
import uuid # pylint: disable=C0411

from distutils.spawn import find_executable # pylint: disable=E0611
from shutil import which
import pytest

WRONG_FILE_NAME_CHARS_RE = re.compile(r'[^\w_-]')
Expand Down Expand Up @@ -70,7 +70,7 @@ def watcher_getter_function(name, arguments=None, kwargs=None, timeout=20, check
if request is None:
warnings.warn('Omitting the `request` parameter will result in an unstable order of finalizers.')
request = orig_request
executable = find_executable(name)
executable = which(name)
assert executable, 'You have to install {0} executable.'.format(name)

cmd = [name] + (arguments or [])
Expand Down