Show More
@@ -0,0 +1,47 b'' | |||||
|
1 | #!/usr/bin/env python | |||
|
2 | # -*- coding: utf-8 -*- | |||
|
3 | """IPython Test Suite Runner. | |||
|
4 | """ | |||
|
5 | ||||
|
6 | import sys | |||
|
7 | import warnings | |||
|
8 | ||||
|
9 | from nose.core import TestProgram | |||
|
10 | import nose.plugins.builtin | |||
|
11 | ||||
|
12 | from IPython.testing.plugin.ipdoctest import IPythonDoctest | |||
|
13 | ||||
|
14 | def main(): | |||
|
15 | """Run the IPython test suite. | |||
|
16 | """ | |||
|
17 | ||||
|
18 | warnings.filterwarnings('ignore', | |||
|
19 | 'This will be removed soon. Use IPython.testing.util instead') | |||
|
20 | ||||
|
21 | ||||
|
22 | # construct list of plugins, omitting the existing doctest plugin | |||
|
23 | plugins = [IPythonDoctest()] | |||
|
24 | for p in nose.plugins.builtin.plugins: | |||
|
25 | plug = p() | |||
|
26 | if plug.name == 'doctest': | |||
|
27 | continue | |||
|
28 | ||||
|
29 | #print 'adding plugin:',plug.name # dbg | |||
|
30 | plugins.append(plug) | |||
|
31 | ||||
|
32 | argv = sys.argv + ['--doctest-tests','--doctest-extension=txt', | |||
|
33 | '--with-ipdoctest','--exe'] | |||
|
34 | ||||
|
35 | has_ip = False | |||
|
36 | for arg in sys.argv: | |||
|
37 | if 'IPython' in arg: | |||
|
38 | has_ip = True | |||
|
39 | break | |||
|
40 | ||||
|
41 | if not has_ip: | |||
|
42 | argv.append('IPython') | |||
|
43 | ||||
|
44 | TestProgram(argv=argv,plugins=plugins) | |||
|
45 | ||||
|
46 | if __name__ == '__main__': | |||
|
47 | main() |
General Comments 0
You need to be logged in to leave comments.
Login now