Show More
@@ -1,4 +1,3 | |||
|
1 | #!/usr/bin/env python | |
|
2 | 1 |
|
|
3 | 2 | """IPython Test Suite Runner. |
|
4 | 3 | """ |
@@ -18,28 +17,18 def main(): | |||
|
18 | 17 | warnings.filterwarnings('ignore', |
|
19 | 18 | 'This will be removed soon. Use IPython.testing.util instead') |
|
20 | 19 | |
|
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 | '--detailed-errors', | |
|
20 | argv = sys.argv + [ '--with-ipdoctest', | |
|
21 | '--doctest-tests','--doctest-extension=txt', | |
|
22 | '--detailed-errors', | |
|
34 | 23 | |
|
35 | # We add --exe because of setuptools' imbecility (it | |
|
36 | # blindly does chmod +x on ALL files). Nose does the | |
|
37 | # right thing and it tries to avoid executables, | |
|
38 | # setuptools unfortunately forces our hand here. This | |
|
39 | # has been discussed on the distutils list and the | |
|
40 | # setuptools devs refuse to fix this problem! | |
|
41 | '--exe', | |
|
42 | ] | |
|
24 | # We add --exe because of setuptools' imbecility (it | |
|
25 | # blindly does chmod +x on ALL files). Nose does the | |
|
26 | # right thing and it tries to avoid executables, | |
|
27 | # setuptools unfortunately forces our hand here. This | |
|
28 | # has been discussed on the distutils list and the | |
|
29 | # setuptools devs refuse to fix this problem! | |
|
30 | '--exe', | |
|
31 | ] | |
|
43 | 32 | |
|
44 | 33 | has_ip = False |
|
45 | 34 | for arg in sys.argv: |
@@ -50,4 +39,15 def main(): | |||
|
50 | 39 | if not has_ip: |
|
51 | 40 | argv.append('IPython') |
|
52 | 41 | |
|
42 | # construct list of plugins, omitting the existing doctest plugin | |
|
43 | plugins = [IPythonDoctest()] | |
|
44 | for p in nose.plugins.builtin.plugins: | |
|
45 | plug = p() | |
|
46 | if plug.name == 'doctest': | |
|
47 | continue | |
|
48 | ||
|
49 | #print '*** adding plugin:',plug.name # dbg | |
|
50 | plugins.append(plug) | |
|
51 | ||
|
52 | ||
|
53 | 53 | TestProgram(argv=argv,plugins=plugins) |
@@ -36,8 +36,8 deco: | |||
|
36 | 36 | magic: plugin |
|
37 | 37 | $(NOSE) IPython.Magic |
|
38 | 38 | |
|
39 |
|
|
|
40 |
$(NOSE) IPython. |
|
|
39 | excolors: plugin | |
|
40 | $(NOSE) IPython.excolors | |
|
41 | 41 | |
|
42 | 42 | iplib: plugin |
|
43 | 43 | $(NOSE) IPython.iplib |
@@ -688,6 +688,7 class ExtensionDoctest(doctests.Doctest): | |||
|
688 | 688 | self.globs = None |
|
689 | 689 | self.extraglobs = None |
|
690 | 690 | |
|
691 | ||
|
691 | 692 | def loadTestsFromExtensionModule(self,filename): |
|
692 | 693 | bpath,mod = os.path.split(filename) |
|
693 | 694 | modname = os.path.splitext(mod)[0] |
@@ -703,8 +704,8 class ExtensionDoctest(doctests.Doctest): | |||
|
703 | 704 | # a few modifications to control output checking. |
|
704 | 705 | |
|
705 | 706 | def loadTestsFromModule(self, module): |
|
706 | #print 'lTM',module # dbg | |
|
707 | ||
|
707 | #print '*** ipdoctest - lTM',module # dbg | |
|
708 | ||
|
708 | 709 | if not self.matches(module.__name__): |
|
709 | 710 | log.debug("Doctest doesn't want module %s", module) |
|
710 | 711 | return |
@@ -733,8 +734,6 class ExtensionDoctest(doctests.Doctest): | |||
|
733 | 734 | |
|
734 | 735 | |
|
735 | 736 | def loadTestsFromFile(self, filename): |
|
736 | #print 'lTF',filename # dbg | |
|
737 | ||
|
738 | 737 | if is_extension_module(filename): |
|
739 | 738 | for t in self.loadTestsFromExtensionModule(filename): |
|
740 | 739 | yield t |
@@ -761,7 +760,7 class ExtensionDoctest(doctests.Doctest): | |||
|
761 | 760 | Modified version that accepts extension modules as valid containers for |
|
762 | 761 | doctests. |
|
763 | 762 | """ |
|
764 |
print ' |
|
|
763 | #print '*** ipdoctest- wantFile:',filename # dbg | |
|
765 | 764 | |
|
766 | 765 | # XXX - temporarily hardcoded list, will move to driver later |
|
767 | 766 | exclude = ['IPython/external/', |
@@ -791,7 +790,7 class IPythonDoctest(ExtensionDoctest): | |||
|
791 | 790 | """ |
|
792 | 791 | name = 'ipdoctest' # call nosetests with --with-ipdoctest |
|
793 | 792 | enabled = True |
|
794 | ||
|
793 | ||
|
795 | 794 | def configure(self, options, config): |
|
796 | 795 | |
|
797 | 796 | Plugin.configure(self, options, config) |
General Comments 0
You need to be logged in to leave comments.
Login now