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

Function report

IPython/testing/iptestcontroller.py:248–284  ·  view source on GitHub ↗

Return a string with a summary report of test-related variables.

()

Source from the content-addressed store, hash-verified

246 controller.cleanup()
247
248def report():
249 """Return a string with a summary report of test-related variables."""
250 inf = get_sys_info()
251 out = []
252 def _add(name, value):
253 out.append((name, value))
254
255 _add('IPython version', inf['ipython_version'])
256 _add('IPython commit', "{} ({})".format(inf['commit_hash'], inf['commit_source']))
257 _add('IPython package', compress_user(inf['ipython_path']))
258 _add('Python version', inf['sys_version'].replace('\n',''))
259 _add('sys.executable', compress_user(inf['sys_executable']))
260 _add('Platform', inf['platform'])
261
262 width = max(len(n) for (n,v) in out)
263 out = ["{:<{width}}: {}\n".format(n, v, width=width) for (n,v) in out]
264
265 avail = []
266 not_avail = []
267
268 for k, is_avail in have.items():
269 if is_avail:
270 avail.append(k)
271 else:
272 not_avail.append(k)
273
274 if avail:
275 out.append('\nTools and libraries available at test time:\n')
276 avail.sort()
277 out.append(' ' + ' '.join(avail)+'\n')
278
279 if not_avail:
280 out.append('\nTools and libraries NOT available at test time:\n')
281 not_avail.sort()
282 out.append(' ' + ' '.join(not_avail)+'\n')
283
284 return ''.join(out)
285
286def run_iptestall(options):
287 """Run the entire IPython test suite by calling nose and trial.

Callers 1

run_iptestallFunction · 0.70

Calls 5

get_sys_infoFunction · 0.90
compress_userFunction · 0.90
_addFunction · 0.85
sortMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected