Skip to content

Commit 4492904

Browse files
authored
test_argcomplete: remove usage of distutils.spawn (#6703)
Fixes collection error with Python 3.5.3 (Travis): testing/test_parseopt.py:2: in <module> import distutils.spawn .tox/py35-coverage/lib/python3.5/distutils/__init__.py:4: in <module> import imp .tox/py35-coverage/lib/python3.5/imp.py:33: in <module> PendingDeprecationWarning, stacklevel=2) E PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses Build log: https://travis-ci.org/blueyed/pytest/builds/648305304
1 parent 30cb598 commit 4492904

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testing/test_parseopt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import argparse
2-
import distutils.spawn
32
import os
43
import shlex
4+
import shutil
55
import sys
66

77
import py
@@ -291,7 +291,7 @@ def test_multiple_metavar_help(self, parser):
291291

292292

293293
def test_argcomplete(testdir, monkeypatch):
294-
if not distutils.spawn.find_executable("bash"):
294+
if not shutil.which("bash"):
295295
pytest.skip("bash not available")
296296
script = str(testdir.tmpdir.join("test_argcomplete"))
297297

0 commit comments

Comments
 (0)