Skip to content

Commit f59fa39

Browse files
kevin-batesZsailer
authored andcommitted
Remove redundant kernel seed test
1 parent a315d77 commit f59fa39

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

kernel_gateway/tests/notebook_http/test_request_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@
77
from kernel_gateway.notebook_http.request_utils import (format_request,
88
parse_body, parameterize_path, headers_to_dict, parse_args)
99

10+
1011
class MockRequest(dict):
1112
def __init__(self, *args, **kwargs):
1213
super(MockRequest, self).__init__(*args, **kwargs)
1314
self.__dict__ = self
1415

16+
1517
class MockHeaders(object):
1618
def __init__(self, headers, **kwargs):
1719
self.headers = headers
1820

1921
def get_all(self):
2022
return self.headers
2123

24+
2225
class TestRequestUtils(unittest.TestCase):
2326
"""Unit tests the request utility helper functions."""
2427
def test_parse_body_text(self):

kernel_gateway/tests/test_jupyter_websocket.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -597,19 +597,7 @@ async def test_seed_error(self, jp_argv, jp_fetch):
597597
kernels = json_decode(response.body)
598598
assert len(kernels) == 0
599599

600-
@pytest.mark.parametrize("jp_argv",
601-
([f"--KernelGatewayApp.seed_uri={os.path.join(RESOURCES, 'failing_code.ipynb')}",
602-
"--JupyterWebsocketPersonality.list_kernels=True",
603-
"--JupyterWebsocketPersonality.prespawn_count=1"],))
604-
async def test_seed_kernel_failing(self, jp_argv, jp_fetch):
605-
"""
606-
Server should error because seed notebook has an error.
607-
"""
608-
with pytest.raises(HTTPClientError) as e:
609-
await jp_fetch("api", "kernels", method='POST', body='{}')
610-
assert e.value.response.code == 500
611-
612-
def test_seed_kernel_not_available(self):
600+
async def test_seed_kernel_not_available(self):
613601
"""
614602
Server should error because seed notebook requires a kernel that is not
615603
installed.
@@ -622,7 +610,7 @@ def test_seed_kernel_not_available(self):
622610

623611
@pytest.mark.parametrize("jp_argv",
624612
([f"--KernelGatewayApp.seed_uri={os.path.join(RESOURCES, 'zen.ipynb')}",
625-
"--JupyterWebsocketPersonality.prespawn_count=1"],))
613+
"--KernelGatewayApp.prespawn_count=1"],))
626614
class TestKernelLanguageSupport:
627615
"""Tests gateway behavior when a client requests a specific kernel spec."""
628616
async def test_seed_language_support(self, jp_argv, spawn_kernel):

0 commit comments

Comments
 (0)