Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit 87849fc

Browse files
authored
Merge pull request #1314 from bjones1/py3.5
Fix: Use Python 3.5-compatible keywords for subprocess.
2 parents 157720c + 40d132f commit 87849fc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/ci_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Standard library
1111
# ----------------
1212
from __future__ import print_function
13-
from subprocess import run
13+
from subprocess import run, PIPE
1414
import sys
1515
import os
1616
import os.path
@@ -58,7 +58,7 @@ def xqt(
5858
# works. See https://docs.python.org/3/library/subprocess.html#subprocess.Popen.
5959
executable = ('/bin/bash' if is_linux or is_darwin
6060
else None)
61-
ret.append(run(_, shell=True, capture_output=True,
61+
ret.append(run(_, shell=True, stdout=PIPE, stderr=PIPE,
6262
executable=executable, **kwargs))
6363

6464
# Return a list only if there were multiple commands to execute.

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ def pytest_addoption(parser):
6767
# Output a coverage report when testing is done. See https://docs.pytest.org/en/latest/reference.html#_pytest.hookspec.pytest_terminal_summary.
6868
def pytest_terminal_summary(terminalreporter):
6969
with pushd('../../..'):
70-
cp = xqt('{} -m coverage report'.format(sys.executable), text=True)
70+
cp = xqt('{} -m coverage report'.format(sys.executable),
71+
universal_newlines=True)
7172
terminalreporter.write_line(cp.stdout + cp.stderr)
7273

7374

0 commit comments

Comments
 (0)