示例#1
0
 def test_get_running_kernels(self):
     import subprocess
     kernel = subprocess.Popen(["python", "-m", "cwlkernel"])
     pids = []
     try:
         pids = CWLLogger.get_running_kernels()
     except Exception:
         pass
     finally:
         kernel.kill()
     self.assertIn(kernel.pid, pids)
示例#2
0
 def test_get_running_kernels(self):
     import subprocess
     import sys
     kernel = subprocess.Popen([f"{sys.executable}", "-m", "cwlkernel"])
     pids = []
     try:
         pids = CWLLogger.get_running_kernels()
     except Exception as e:
         print(f'ERROR:::: {e}')
     finally:
         kernel.kill()
     self.assertIn(kernel.pid, pids)