File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 2
2
module containing a parametrized tests testing cross-python
3
3
serialization via the pickle module.
4
4
"""
5
- import distutils . spawn
5
+ import shutil
6
6
import subprocess
7
7
import textwrap
8
8
@@ -24,7 +24,7 @@ def python2(request, python1):
24
24
25
25
class Python :
26
26
def __init__ (self , version , picklefile ):
27
- self .pythonpath = distutils . spawn . find_executable (version )
27
+ self .pythonpath = shutil . which (version )
28
28
if not self .pythonpath :
29
29
pytest .skip ("{!r} not found" .format (version ))
30
30
self .picklefile = picklefile
Original file line number Diff line number Diff line change @@ -435,15 +435,9 @@ Running it results in some skips if we don't have all the python interpreters in
435
435
436
436
. $ pytest -rs -q multipython.py
437
437
ssssssssssss......sss...... [100%]
438
- ============================= warnings summary =============================
439
- $PYTHON_PREFIX/lib/python3.6/distutils/__init__.py:1
440
- $PYTHON_PREFIX/lib/python3.6/distutils/__init__.py:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
441
- import imp
442
-
443
- -- Docs: https://docs.pytest.org/en/latest/warnings.html
444
438
========================= short test summary info ==========================
445
439
SKIPPED [15] $REGENDOC_TMPDIR/CWD/multipython.py:30: 'python3.5' not found
446
- 12 passed, 15 skipped, 1 warnings in 0.12 seconds
440
+ 12 passed, 15 skipped in 0.12 seconds
447
441
448
442
Indirect parametrization of optional implementations/imports
449
443
--------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments