MCPcopy Create free account
hub / github.com/ipython/ipython / do_run

Function do_run

IPython/testing/iptestcontroller.py:216–246  ·  view source on GitHub ↗

Setup and run a test controller. If buffer_output is True, no output is displayed, to avoid it appearing interleaved. In this case, the caller is responsible for displaying test output on failure. Returns ------- controller : TestController The same controller

(controller, buffer_output=True)

Source from the content-addressed store, hash-verified

214 return to_run, not_run
215
216def do_run(controller, buffer_output=True):
217 """Setup and run a test controller.
218
219 If buffer_output is True, no output is displayed, to avoid it appearing
220 interleaved. In this case, the caller is responsible for displaying test
221 output on failure.
222
223 Returns
224 -------
225 controller : TestController
226 The same controller as passed in, as a convenience for using map() type
227 APIs.
228 exitcode : int
229 The exit code of the test subprocess. Non-zero indicates failure.
230 """
231 try:
232 try:
233 controller.setup()
234 controller.launch(buffer_output=buffer_output)
235 except Exception:
236 import traceback
237 traceback.print_exc()
238 return controller, 1 # signal failure
239
240 exitcode = controller.wait()
241 return controller, exitcode
242
243 except KeyboardInterrupt:
244 return controller, -signal.SIGINT
245 finally:
246 controller.cleanup()
247
248def report():
249 """Return a string with a summary report of test-related variables."""

Callers 1

run_iptestallFunction · 0.85

Calls 4

waitMethod · 0.80
setupMethod · 0.45
launchMethod · 0.45
cleanupMethod · 0.45

Tested by

no test coverage detected