From: Debian Science Maintainers Date: Tue, 28 Jan 2020 22:29:29 +0000 (+0000) Subject: Use same Python version for subprocess test X-Git-Tag: archive/raspbian/0.11.1-2+rpi1~2^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d85bfd5e0094ee1f15e4253c98ee1faf8ee6c0a4;p=statsmodels.git Use same Python version for subprocess test Avoids a fail due to mismatched extension .so version when multiple Python 3 versions are available Author: Rebecca N. Palmer Forwarded: no Gbp-Pq: Name subprocess_use_same_pyver.patch --- diff --git a/statsmodels/tests/test_package.py b/statsmodels/tests/test_package.py index 74dd519..694300e 100644 --- a/statsmodels/tests/test_package.py +++ b/statsmodels/tests/test_package.py @@ -15,7 +15,8 @@ def test_lazy_imports(): "assert not mods, mods") # TODO: is there a cleaner way to do this import in an isolated environment - pyexe = 'python3' if PY3 else 'python' + import sys + pyexe = sys.executable or 'python3' p = subprocess.Popen(pyexe + ' -c "' + cmd + '"', shell=True, close_fds=True) p.wait()