Skip to content

Commit

Permalink
Remove Nose dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Kojoley committed Nov 23, 2021
1 parent 54fea2a commit 9a5544e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
9 changes: 7 additions & 2 deletions ipykernel/tests/test_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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 +241,13 @@ def test_smoke_faulthandler():

def test_help_output():
"""ipython kernel --help-all works"""
tt.help_all_output_test('kernel')
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


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

0 comments on commit 9a5544e

Please sign in to comment.