コード例 #1
0
ファイル: test_kernels.py プロジェクト: dwyde/poolside
 def test_delete_kernel(self):
     language = 'python'
     controller = KernelController(PATH)
     kernel = controller._get_kernel(language)
     pid = kernel.pid
     self.assertEqual(check_pid(pid), True)
     controller.delete_kernel(language)
     kernel.wait()
     self.assertEqual(check_pid(pid), False)
     self.assertEqual(language in controller, False)
コード例 #2
0
ファイル: test_kernels.py プロジェクト: dwyde/poolside
 def test_delete_controller(self):
     """
     Check that deleting a controller will kill child subprocesses.
     """
     
     controller = KernelController(PATH)
     kernels = [controller._get_kernel(lang) \
             for lang in controller.languages()]
     pids = [kernel.pid for kernel in kernels]
     del controller
     for pid, kernel in zip(pids, kernels):
         kernel.wait()
         self.assertEquals(check_pid(pid), False)