def test_filter_processes_dir_win(self): python_dir = os.path.dirname(sys.executable) processes = file_path.filter_processes_dir_win(file_path.enum_processes_win(), python_dir) self.assertTrue(processes) proc_names = [proc.ExecutablePath for proc in processes] # Try to find at least one python process. self.assertTrue(any(proc == sys.executable for proc in proc_names), proc_names)
def test_filter_processes_dir_win(self): python_dir = os.path.dirname(sys.executable) processes = file_path.filter_processes_dir_win( file_path.enum_processes_win(), python_dir) self.assertTrue(processes) proc_names = [proc.ExecutablePath for proc in processes] # Try to find at least one python process. self.assertTrue( any(proc == sys.executable for proc in proc_names), proc_names)