Return a string with a summary report of test-related variables.
()
| 246 | controller.cleanup() |
| 247 | |
| 248 | def 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 | |
| 286 | def run_iptestall(options): |
| 287 | """Run the entire IPython test suite by calling nose and trial. |
no test coverage detected