Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Nose dependency #808

Merged
merged 2 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 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 All @@ -14,7 +15,6 @@
import pytest
from packaging import version

from IPython.testing import tools as tt
import IPython
from IPython.paths import locate_profile

Expand Down Expand Up @@ -242,7 +242,12 @@ def test_smoke_faulthandler():

def test_help_output():
"""ipython kernel --help-all works"""
tt.help_all_output_test('kernel')
cmd = [sys.executable, "-m", "IPython", "kernel", "--help-all"]
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
8 changes: 4 additions & 4 deletions ipykernel/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
from queue import Empty
from subprocess import STDOUT

import nose

from jupyter_client import manager


Expand All @@ -32,8 +30,9 @@ def start_new_kernel(**kwargs):
"""
kwargs['stderr'] = STDOUT
try:
import nose
kwargs['stdout'] = nose.iptest_stdstreams_fileno()
except AttributeError:
except (ImportError, AttributeError):
pass
return manager.start_new_kernel(startup_timeout=STARTUP_TIMEOUT, **kwargs)

Expand Down Expand Up @@ -145,8 +144,9 @@ def new_kernel(argv=None):
"""
kwargs = {'stderr': STDOUT}
try:
import nose
kwargs['stdout'] = nose.iptest_stdstreams_fileno()
except AttributeError:
except (ImportError, AttributeError):
pass
if argv is not None:
kwargs['extra_arguments'] = argv
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def run(self):
"pytest !=5.3.4",
"pytest-cov",
"flaky",
"nose", # nose because we are still using nose streams from ipython
"ipyparallel",
],
},
Expand Down