From 5810ecc30e8b700accb119a0db85dbe09b26f074 2015-04-01 00:37:51 From: Min RK Date: 2015-04-01 00:37:51 Subject: [PATCH] install IPython kernel in temp IPython dir --- diff --git a/IPython/testing/iptestcontroller.py b/IPython/testing/iptestcontroller.py index c502d7f..6cbc8be 100644 --- a/IPython/testing/iptestcontroller.py +++ b/IPython/testing/iptestcontroller.py @@ -165,6 +165,16 @@ class PyTestController(TestController): ipydir = TemporaryDirectory() self.dirs.append(ipydir) self.env['IPYTHONDIR'] = ipydir.name + # FIXME: install IPython kernel in temporary IPython dir + # remove after big split + try: + from jupyter_client.kernelspec import KernelSpecManager + except ImportError: + pass + else: + ksm = KernelSpecManager(ipython_dir=ipydir.name) + ksm.install_native_kernel_spec(user=True) + self.workingdir = workingdir = TemporaryDirectory() self.dirs.append(workingdir) self.env['IPTEST_WORKING_DIR'] = workingdir.name