##// END OF EJS Templates
Checkpoint before merging with upstream
Fernando Perez -
Show More
@@ -40,11 +40,12 b' except ImportError:'
40 40 # IPython imports
41 41 import IPython
42 42 from IPython import ultraTB, ipapi
43 from IPython.Magic import Magic
43 44 from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no
44 45 from IPython.iplib import InteractiveShell
45 46 from IPython.ipmaker import make_IPython
46 from IPython.Magic import Magic
47 47 from IPython.ipstruct import Struct
48 from IPython.testing import decorators as testdec
48 49
49 50 # Globals
50 51 # global flag to pass around information about Ctrl-C without exceptions
@@ -608,6 +609,7 b' class MatplotlibShellBase:'
608 609 if self.mpl_use._called:
609 610 self.matplotlib.rcParams['backend'] = self.mpl_backend
610 611
612 @testdec.skip_doctest
611 613 def magic_run(self,parameter_s=''):
612 614 Magic.magic_run(self,parameter_s,runner=self.mplot_exec)
613 615
@@ -658,6 +658,24 b' class ExtensionDoctest(doctests.Doctest):'
658 658
659 659 def options(self, parser, env=os.environ):
660 660 Plugin.options(self, parser, env)
661 parser.add_option('--doctest-tests', action='store_true',
662 dest='doctest_tests',
663 default=env.get('NOSE_DOCTEST_TESTS',True),
664 help="Also look for doctests in test modules. "
665 "Note that classes, methods and functions should "
666 "have either doctests or non-doctest tests, "
667 "not both. [NOSE_DOCTEST_TESTS]")
668 parser.add_option('--doctest-extension', action="append",
669 dest="doctestExtension",
670 help="Also look for doctests in files with "
671 "this extension [NOSE_DOCTEST_EXTENSION]")
672 # Set the default as a list, if given in env; otherwise
673 # an additional value set on the command line will cause
674 # an error.
675 env_setting = env.get('NOSE_DOCTEST_EXTENSION')
676 if env_setting is not None:
677 parser.set_defaults(doctestExtension=tolist(env_setting))
678
661 679
662 680 def configure(self, options, config):
663 681 Plugin.configure(self, options, config)
@@ -743,16 +761,19 b' class ExtensionDoctest(doctests.Doctest):'
743 761 Modified version that accepts extension modules as valid containers for
744 762 doctests.
745 763 """
746 #print 'Filename:',filename # dbg
764 print 'Filename:',filename # dbg
747 765
748 766 # XXX - temporarily hardcoded list, will move to driver later
749 767 exclude = ['IPython/external/',
750 'IPython/Extensions/ipy_',
751 768 'IPython/platutils_win32',
752 769 'IPython/frontend/cocoa',
753 770 'IPython_doctest_plugin',
754 771 'IPython/Gnuplot',
755 'IPython/Extensions/PhysicalQIn']
772 'IPython/Extensions/ipy_',
773 'IPython/Extensions/PhysicalQIn',
774 'IPython/Extensions/scitedirector',
775 'IPython/testing/plugin',
776 ]
756 777
757 778 for fex in exclude:
758 779 if fex in filename: # substring
@@ -782,3 +803,4 b' class IPythonDoctest(ExtensionDoctest):'
782 803 self.checker = IPDoctestOutputChecker()
783 804 self.globs = None
784 805 self.extraglobs = None
806
@@ -9,6 +9,7 b' Utilities for testing code.'
9 9 # testing machinery from snakeoil that were good have already been merged into
10 10 # the nose plugin, so this can be taken away soon. Leave a warning for now,
11 11 # we'll remove it in a later release (around 0.10 or so).
12
12 13 from warnings import warn
13 14 warn('This will be removed soon. Use IPython.testing.util instead',
14 15 DeprecationWarning)
@@ -446,6 +446,7 b' class ListTB(TBTools):'
446 446 Also lifted nearly verbatim from traceback.py
447 447 """
448 448
449 have_filedata = False
449 450 Colors = self.Colors
450 451 list = []
451 452 try:
@@ -152,8 +152,6 b" if 'setuptools' in sys.modules:"
152 152 )
153 153 # Allow setuptools to handle the scripts
154 154 scripts = []
155 # eggs will lack docs, examples
156 data_files = []
157 155 else:
158 156 # package_data of setuptools was introduced to distutils in 2.4
159 157 cfgfiles = filter(isfile, glob('IPython/UserConfig/*'))
@@ -225,6 +225,7 b' def find_scripts():'
225 225 'scripts/ipythonx',
226 226 'scripts/pycolor',
227 227 'scripts/irunner',
228 'scripts/iptest',
228 229 ]
229 230
230 231 # Script to be run by the windows binary installer after the default setup
General Comments 0
You need to be logged in to leave comments. Login now