Skip to content

Commit

Permalink
Replace IPython.utils.process.get_output_error_code with subprocess.run
Browse files Browse the repository at this point in the history
  • Loading branch information
Kojoley committed Nov 23, 2021
1 parent 9a5544e commit 6a727a4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ipykernel/tests/test_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import ast
import io
import os.path
import subprocess
import sys
import time
from tempfile import TemporaryDirectory
Expand Down Expand Up @@ -241,13 +242,12 @@ def test_smoke_faulthandler():

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


def test_is_complete():
Expand Down

0 comments on commit 6a727a4

Please sign in to comment.