Show More
@@ -355,7 +355,7 b' class IPTester(object):' | |||||
355 |
|
355 | |||
356 | # Find the section we're testing (IPython.foo) |
|
356 | # Find the section we're testing (IPython.foo) | |
357 | for sect in self.params: |
|
357 | for sect in self.params: | |
358 | if sect.startswith('IPython'): break |
|
358 | if sect.startswith('IPython') or sect in special_test_suites: break | |
359 | else: |
|
359 | else: | |
360 | raise ValueError("Section not found", self.params) |
|
360 | raise ValueError("Section not found", self.params) | |
361 |
|
361 | |||
@@ -429,6 +429,10 b' class IPTester(object):' | |||||
429 | # The process did not die... |
|
429 | # The process did not die... | |
430 | print('... failed. Manual cleanup may be required.') |
|
430 | print('... failed. Manual cleanup may be required.') | |
431 |
|
431 | |||
|
432 | ||||
|
433 | special_test_suites = { | |||
|
434 | 'autoreload': ['IPython.extensions.autoreload', 'IPython.extensions.tests.test_autoreload'], | |||
|
435 | } | |||
432 |
|
436 | |||
433 | def make_runners(inc_slow=False): |
|
437 | def make_runners(inc_slow=False): | |
434 | """Define the top-level packages that need to be tested. |
|
438 | """Define the top-level packages that need to be tested. | |
@@ -458,6 +462,9 b' def make_runners(inc_slow=False):' | |||||
458 |
|
462 | |||
459 | # Make runners |
|
463 | # Make runners | |
460 | runners = [ (v, IPTester('iptest', params=v)) for v in nose_packages ] |
|
464 | runners = [ (v, IPTester('iptest', params=v)) for v in nose_packages ] | |
|
465 | ||||
|
466 | for name in special_test_suites: | |||
|
467 | runners.append((name, IPTester('iptest', params=name))) | |||
461 |
|
468 | |||
462 | return runners |
|
469 | return runners | |
463 |
|
470 | |||
@@ -475,6 +482,12 b' def run_iptest():' | |||||
475 |
|
482 | |||
476 | warnings.filterwarnings('ignore', |
|
483 | warnings.filterwarnings('ignore', | |
477 | 'This will be removed soon. Use IPython.testing.util instead') |
|
484 | 'This will be removed soon. Use IPython.testing.util instead') | |
|
485 | ||||
|
486 | if sys.argv[1] in special_test_suites: | |||
|
487 | sys.argv[1:2] = special_test_suites[sys.argv[1]] | |||
|
488 | special_suite = True | |||
|
489 | else: | |||
|
490 | special_suite = False | |||
478 |
|
491 | |||
479 | argv = sys.argv + [ '--detailed-errors', # extra info in tracebacks |
|
492 | argv = sys.argv + [ '--detailed-errors', # extra info in tracebacks | |
480 |
|
493 | |||
@@ -505,7 +518,8 b' def run_iptest():' | |||||
505 |
|
518 | |||
506 | # use our plugin for doctesting. It will remove the standard doctest plugin |
|
519 | # use our plugin for doctesting. It will remove the standard doctest plugin | |
507 | # if it finds it enabled |
|
520 | # if it finds it enabled | |
508 | plugins = [IPythonDoctest(make_exclude()), KnownFailure()] |
|
521 | ipdt = IPythonDoctest() if special_suite else IPythonDoctest(make_exclude()) | |
|
522 | plugins = [ipdt, KnownFailure()] | |||
509 |
|
523 | |||
510 | # We need a global ipython running in this process, but the special |
|
524 | # We need a global ipython running in this process, but the special | |
511 | # in-process group spawns its own IPython kernels, so for *that* group we |
|
525 | # in-process group spawns its own IPython kernels, so for *that* group we | |
@@ -593,7 +607,7 b' def run_iptestall(inc_slow=False):' | |||||
593 |
|
607 | |||
594 | def main(): |
|
608 | def main(): | |
595 | for arg in sys.argv[1:]: |
|
609 | for arg in sys.argv[1:]: | |
596 | if arg.startswith('IPython'): |
|
610 | if arg.startswith('IPython') or arg in special_test_suites: | |
597 | # This is in-process |
|
611 | # This is in-process | |
598 | run_iptest() |
|
612 | run_iptest() | |
599 | else: |
|
613 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now