##// END OF EJS Templates
BF - allow nose with-doctest setting in environment...
Matthew Brett -
Show More
@@ -355,19 +355,13 b' def run_iptest():'
355 # for nose >= 0.11, though unfortunately nose 0.10 doesn't support it.
355 # for nose >= 0.11, though unfortunately nose 0.10 doesn't support it.
356 argv.append('--traverse-namespace')
356 argv.append('--traverse-namespace')
357
357
358 # Construct list of plugins, omitting the existing doctest plugin, which
358 # use our plugin for doctesting. It will remove the standard doctest plugin
359 # ours replaces (and extends).
359 # if it finds it enabled
360 plugins = [IPythonDoctest(make_exclude()), KnownFailure()]
360 plugins = [IPythonDoctest(make_exclude()), KnownFailure()]
361 for p in nose.plugins.builtin.plugins:
362 plug = p()
363 if plug.name == 'doctest':
364 continue
365 plugins.append(plug)
366
367 # We need a global ipython running in this process
361 # We need a global ipython running in this process
368 globalipapp.start_ipython()
362 globalipapp.start_ipython()
369 # Now nose can run
363 # Now nose can run
370 TestProgram(argv=argv, plugins=plugins)
364 TestProgram(argv=argv, addplugins=plugins)
371
365
372
366
373 def run_iptestall():
367 def run_iptestall():
@@ -640,6 +640,9 b' class ExtensionDoctest(doctests.Doctest):'
640
640
641 def configure(self, options, config):
641 def configure(self, options, config):
642 Plugin.configure(self, options, config)
642 Plugin.configure(self, options, config)
643 # Pull standard doctest plugin out of config; we will do doctesting
644 config.plugins.plugins = [p for p in config.plugins.plugins
645 if p.name != 'doctest']
643 self.doctest_tests = options.doctest_tests
646 self.doctest_tests = options.doctest_tests
644 self.extension = tolist(options.doctestExtension)
647 self.extension = tolist(options.doctestExtension)
645
648
@@ -783,6 +786,9 b' class IPythonDoctest(ExtensionDoctest):'
783 def configure(self, options, config):
786 def configure(self, options, config):
784 #print "Configuring nose plugin:", self.name # dbg
787 #print "Configuring nose plugin:", self.name # dbg
785 Plugin.configure(self, options, config)
788 Plugin.configure(self, options, config)
789 # Pull standard doctest plugin out of config; we will do doctesting
790 config.plugins.plugins = [p for p in config.plugins.plugins
791 if p.name != 'doctest']
786 self.doctest_tests = options.ipdoctest_tests
792 self.doctest_tests = options.ipdoctest_tests
787 self.extension = tolist(options.ipdoctest_extension)
793 self.extension = tolist(options.ipdoctest_extension)
788
794
General Comments 0
You need to be logged in to leave comments. Login now