summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2020-02-10 11:52:19 +0100
committerGitHub <noreply@github.com>2020-02-10 11:52:19 +0100
commit449290406c37010f04bcc114b3af356bb1ae50f8 (patch)
treecf0f66f970145d7bb1e5145700554b5556e09404
parent30cb598e9c4bda0d35aeea6657ba6a957bcec957 (diff)
downloadpytest-449290406c37010f04bcc114b3af356bb1ae50f8.tar.gz
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
-rw-r--r--testing/test_parseopt.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/test_parseopt.py b/testing/test_parseopt.py
index ded5167d8..7c94fdb1e 100644
--- a/testing/test_parseopt.py
+++ b/testing/test_parseopt.py
@@ -1,7 +1,7 @@
import argparse
-import distutils.spawn
import os
import shlex
+import shutil
import sys
import py
@@ -291,7 +291,7 @@ class TestParser:
def test_argcomplete(testdir, monkeypatch):
- if not distutils.spawn.find_executable("bash"):
+ if not shutil.which("bash"):
pytest.skip("bash not available")
script = str(testdir.tmpdir.join("test_argcomplete"))