()
| 461 | return options |
| 462 | |
| 463 | def main(): |
| 464 | # iptest doesn't work correctly if the working directory is the |
| 465 | # root of the IPython source tree. Tell the user to avoid |
| 466 | # frustration. |
| 467 | if os.path.exists(os.path.join(os.getcwd(), |
| 468 | 'IPython', 'testing', '__main__.py')): |
| 469 | print("Don't run iptest from the IPython source directory", |
| 470 | file=sys.stderr) |
| 471 | sys.exit(1) |
| 472 | # Arguments after -- should be passed through to nose. Argparse treats |
| 473 | # everything after -- as regular positional arguments, so we separate them |
| 474 | # first. |
| 475 | try: |
| 476 | ix = sys.argv.index('--') |
| 477 | except ValueError: |
| 478 | to_parse = sys.argv[1:] |
| 479 | extra_args = [] |
| 480 | else: |
| 481 | to_parse = sys.argv[1:ix] |
| 482 | extra_args = sys.argv[ix+1:] |
| 483 | |
| 484 | options = argparser.parse_args(to_parse) |
| 485 | options.extra_args = extra_args |
| 486 | |
| 487 | run_iptestall(options) |
| 488 | |
| 489 | |
| 490 | if __name__ == '__main__': |
no test coverage detected