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

Function run_iptestall

IPython/testing/iptestcontroller.py:286–435  ·  view source on GitHub ↗

Run the entire IPython test suite by calling nose and trial. This function constructs :class:`IPTester` instances for all IPython modules and package and then runs each of them. This causes the modules and packages of IPython to be tested each in their own subprocess using nose.

(options)

Source from the content-addressed store, hash-verified

284 return ''.join(out)
285
286def run_iptestall(options):
287 """Run the entire IPython test suite by calling nose and trial.
288
289 This function constructs :class:`IPTester` instances for all IPython
290 modules and package and then runs each of them. This causes the modules
291 and packages of IPython to be tested each in their own subprocess using
292 nose.
293
294 Parameters
295 ----------
296
297 All parameters are passed as attributes of the options object.
298
299 testgroups : list of str
300 Run only these sections of the test suite. If empty, run all the available
301 sections.
302
303 fast : int or None
304 Run the test suite in parallel, using n simultaneous processes. If None
305 is passed, one process is used per CPU core. Default 1 (i.e. sequential)
306
307 inc_slow : bool
308 Include slow tests. By default, these tests aren't run.
309
310 url : unicode
311 Address:port to use when running the JS tests.
312
313 xunit : bool
314 Produce Xunit XML output. This is written to multiple foo.xunit.xml files.
315
316 coverage : bool or str
317 Measure code coverage from tests. True will store the raw coverage data,
318 or pass 'html' or 'xml' to get reports.
319
320 extra_args : list
321 Extra arguments to pass to the test subprocesses, e.g. '-v'
322 """
323 to_run, not_run = prepare_controllers(options)
324
325 def justify(ltext, rtext, width=70, fill='-'):
326 ltext += ' '
327 rtext = (' ' + rtext).rjust(width - len(ltext), fill)
328 return ltext + rtext
329
330 # Run all test runners, tracking execution time
331 failed = []
332 t_start = time.time()
333
334 print()
335 if options.fast == 1:
336 # This actually means sequential, i.e. with 1 job
337 for controller in to_run:
338 print('Test group:', controller.section)
339 sys.stdout.flush() # Show in correct order when output is piped
340 controller, res = do_run(controller, buffer_output=False)
341 if res:
342 failed.append(controller)
343 if res == -signal.SIGINT:

Callers 2

testFunction · 0.85
mainFunction · 0.85

Calls 10

decodeFunction · 0.90
prepare_controllersFunction · 0.85
do_runFunction · 0.85
justifyFunction · 0.85
CustomHtmlReporterClass · 0.85
timeMethod · 0.80
saveMethod · 0.80
reportFunction · 0.70
flushMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected