##// END OF EJS Templates
Merge pull request #6445 from minrk/kernelspecs-test...
Thomas Kluyver -
r17820:eb8a82fa merge
parent child Browse files
Show More
@@ -10,6 +10,7 b' pjoin = os.path.join'
10 10
11 11 import requests
12 12
13 from IPython.kernel.kernelspec import NATIVE_KERNEL_NAME
13 14 from IPython.html.utils import url_path_join
14 15 from IPython.html.tests.launchnotebook import NotebookTestBase, assert_http_error
15 16
@@ -70,12 +71,16 b' class APITest(NotebookTestBase):'
70 71 assert isinstance(specs, list)
71 72
72 73 # 2: the sample kernelspec created in setUp, and the native Python kernel
73 self.assertEqual(len(specs), 2)
74 self.assertGreaterEqual(len(specs), 2)
74 75
75 76 def is_sample_kernelspec(s):
76 77 return s['name'] == 'sample' and s['display_name'] == 'Test kernel'
77 78
79 def is_default_kernelspec(s):
80 return s['name'] == NATIVE_KERNEL_NAME and s['display_name'].startswith("IPython")
81
78 82 assert any(is_sample_kernelspec(s) for s in specs), specs
83 assert any(is_default_kernelspec(s) for s in specs), specs
79 84
80 85 def test_get_kernelspec(self):
81 86 spec = self.ks_api.kernel_spec_info('Sample').json() # Case insensitive
General Comments 0
You need to be logged in to leave comments. Login now