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 22module containing a parametrized tests testing cross-python
33serialization via the pickle module.
44"""
5- import distutils . spawn
5+ import shutil
66import subprocess
77import textwrap
88
@@ -24,7 +24,7 @@ def python2(request, python1):
2424
2525class Python :
2626 def __init__ (self , version , picklefile ):
27- self .pythonpath = distutils . spawn . find_executable (version )
27+ self .pythonpath = shutil . which (version )
2828 if not self .pythonpath :
2929 pytest .skip ("{!r} not found" .format (version ))
3030 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
435435
436436 . $ pytest -rs -q multipython.py
437437 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
444438 ========================= short test summary info ==========================
445439 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
447441
448442 Indirect parametrization of optional implementations/imports
449443--------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments