Skip to content

Commit 6a727a4

Browse files
committed
Replace IPython.utils.process.get_output_error_code with subprocess.run
1 parent 9a5544e commit 6a727a4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ipykernel/tests/test_kernel.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import ast
77
import io
88
import os.path
9+
import subprocess
910
import sys
1011
import time
1112
from tempfile import TemporaryDirectory
@@ -241,13 +242,12 @@ def test_smoke_faulthandler():
241242

242243
def test_help_output():
243244
"""ipython kernel --help-all works"""
244-
from IPython.utils.process import get_output_error_code
245245
cmd = [sys.executable, "-m", "IPython", "kernel", "--help-all"]
246-
out, err, rc = get_output_error_code(cmd)
247-
assert rc == 0, err
248-
assert "Traceback" not in err
249-
assert "Options" in out
250-
assert "Class" in out
246+
proc = subprocess.run(cmd, timeout=30, capture_output=True)
247+
assert proc.returncode == 0, proc.stderr
248+
assert b"Traceback" not in proc.stderr
249+
assert b"Options" in proc.stdout
250+
assert b"Class" in proc.stdout
251251

252252

253253
def test_is_complete():

0 commit comments

Comments
 (0)