MCPcopy Index your code
hub / github.com/datacamp/pythonwhat / run

Method run

pythonwhat/local.py:81–97  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

79 return create({})
80
81 def run(self):
82 shell = self.get_shell()
83 while True:
84 output = []
85 with CaptureErrors(output):
86 next_task = self.task_queue.get()
87 answer = next_task(shell)
88 if len(output) > 0: # means backend error happened
89 answer = output
90 output = []
91 with CaptureErrors(output):
92 self.result_queue.put_nowait(answer)
93 if len(output) > 0: # means backend error happened
94 self.result_queue.put_nowait(output)
95 if isinstance(next_task, TaskKillProcess):
96 break # break while loop -> we do not wait upon new task
97 return
98
99 def executeTask(self, task):
100 self.task_queue.put_nowait(task)

Callers 15

test_check_objectFunction · 0.80
test_is_instanceFunction · 0.80
test_test_data_frameFunction · 0.80
test_check_keysFunction · 0.80
test_check_keys_exoticFunction · 0.80
test_non_dillableFunction · 0.80
test_manual_converterFunction · 0.80
test_parsingFunction · 0.80

Calls 2

get_shellMethod · 0.95
CaptureErrorsClass · 0.85

Tested by 15

test_check_objectFunction · 0.64
test_is_instanceFunction · 0.64
test_test_data_frameFunction · 0.64
test_check_keysFunction · 0.64
test_check_keys_exoticFunction · 0.64
test_non_dillableFunction · 0.64
test_manual_converterFunction · 0.64
test_parsingFunction · 0.64