Show More
@@ -40,11 +40,12 b' except ImportError:' | |||||
40 | # IPython imports |
|
40 | # IPython imports | |
41 | import IPython |
|
41 | import IPython | |
42 | from IPython import ultraTB, ipapi |
|
42 | from IPython import ultraTB, ipapi | |
|
43 | from IPython.Magic import Magic | |||
43 | from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no |
|
44 | from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no | |
44 | from IPython.iplib import InteractiveShell |
|
45 | from IPython.iplib import InteractiveShell | |
45 | from IPython.ipmaker import make_IPython |
|
46 | from IPython.ipmaker import make_IPython | |
46 | from IPython.Magic import Magic |
|
|||
47 | from IPython.ipstruct import Struct |
|
47 | from IPython.ipstruct import Struct | |
|
48 | from IPython.testing import decorators as testdec | |||
48 |
|
49 | |||
49 | # Globals |
|
50 | # Globals | |
50 | # global flag to pass around information about Ctrl-C without exceptions |
|
51 | # global flag to pass around information about Ctrl-C without exceptions | |
@@ -607,7 +608,8 b' class MatplotlibShellBase:' | |||||
607 | # if a backend switch was performed, reverse it now |
|
608 | # if a backend switch was performed, reverse it now | |
608 | if self.mpl_use._called: |
|
609 | if self.mpl_use._called: | |
609 | self.matplotlib.rcParams['backend'] = self.mpl_backend |
|
610 | self.matplotlib.rcParams['backend'] = self.mpl_backend | |
610 |
|
611 | |||
|
612 | @testdec.skip_doctest | |||
611 | def magic_run(self,parameter_s=''): |
|
613 | def magic_run(self,parameter_s=''): | |
612 | Magic.magic_run(self,parameter_s,runner=self.mplot_exec) |
|
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 | def options(self, parser, env=os.environ): |
|
659 | def options(self, parser, env=os.environ): | |
660 | Plugin.options(self, parser, env) |
|
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 | def configure(self, options, config): |
|
680 | def configure(self, options, config): | |
663 | Plugin.configure(self, options, config) |
|
681 | Plugin.configure(self, options, config) | |
@@ -743,16 +761,19 b' class ExtensionDoctest(doctests.Doctest):' | |||||
743 | Modified version that accepts extension modules as valid containers for |
|
761 | Modified version that accepts extension modules as valid containers for | |
744 | doctests. |
|
762 | doctests. | |
745 | """ |
|
763 | """ | |
746 |
|
|
764 | print 'Filename:',filename # dbg | |
747 |
|
765 | |||
748 | # XXX - temporarily hardcoded list, will move to driver later |
|
766 | # XXX - temporarily hardcoded list, will move to driver later | |
749 | exclude = ['IPython/external/', |
|
767 | exclude = ['IPython/external/', | |
750 | 'IPython/Extensions/ipy_', |
|
|||
751 | 'IPython/platutils_win32', |
|
768 | 'IPython/platutils_win32', | |
752 | 'IPython/frontend/cocoa', |
|
769 | 'IPython/frontend/cocoa', | |
753 | 'IPython_doctest_plugin', |
|
770 | 'IPython_doctest_plugin', | |
754 | 'IPython/Gnuplot', |
|
771 | 'IPython/Gnuplot', | |
755 |
'IPython/Extensions/ |
|
772 | 'IPython/Extensions/ipy_', | |
|
773 | 'IPython/Extensions/PhysicalQIn', | |||
|
774 | 'IPython/Extensions/scitedirector', | |||
|
775 | 'IPython/testing/plugin', | |||
|
776 | ] | |||
756 |
|
777 | |||
757 | for fex in exclude: |
|
778 | for fex in exclude: | |
758 | if fex in filename: # substring |
|
779 | if fex in filename: # substring | |
@@ -782,3 +803,4 b' class IPythonDoctest(ExtensionDoctest):' | |||||
782 | self.checker = IPDoctestOutputChecker() |
|
803 | self.checker = IPDoctestOutputChecker() | |
783 | self.globs = None |
|
804 | self.globs = None | |
784 | self.extraglobs = None |
|
805 | self.extraglobs = None | |
|
806 |
@@ -9,6 +9,7 b' Utilities for testing code.' | |||||
9 | # testing machinery from snakeoil that were good have already been merged into |
|
9 | # testing machinery from snakeoil that were good have already been merged into | |
10 | # the nose plugin, so this can be taken away soon. Leave a warning for now, |
|
10 | # the nose plugin, so this can be taken away soon. Leave a warning for now, | |
11 | # we'll remove it in a later release (around 0.10 or so). |
|
11 | # we'll remove it in a later release (around 0.10 or so). | |
|
12 | ||||
12 | from warnings import warn |
|
13 | from warnings import warn | |
13 | warn('This will be removed soon. Use IPython.testing.util instead', |
|
14 | warn('This will be removed soon. Use IPython.testing.util instead', | |
14 | DeprecationWarning) |
|
15 | DeprecationWarning) |
@@ -445,7 +445,8 b' class ListTB(TBTools):' | |||||
445 |
|
445 | |||
446 | Also lifted nearly verbatim from traceback.py |
|
446 | Also lifted nearly verbatim from traceback.py | |
447 | """ |
|
447 | """ | |
448 |
|
448 | |||
|
449 | have_filedata = False | |||
449 | Colors = self.Colors |
|
450 | Colors = self.Colors | |
450 | list = [] |
|
451 | list = [] | |
451 | try: |
|
452 | try: |
@@ -152,8 +152,6 b" if 'setuptools' in sys.modules:" | |||||
152 | ) |
|
152 | ) | |
153 | # Allow setuptools to handle the scripts |
|
153 | # Allow setuptools to handle the scripts | |
154 | scripts = [] |
|
154 | scripts = [] | |
155 | # eggs will lack docs, examples |
|
|||
156 | data_files = [] |
|
|||
157 | else: |
|
155 | else: | |
158 | # package_data of setuptools was introduced to distutils in 2.4 |
|
156 | # package_data of setuptools was introduced to distutils in 2.4 | |
159 | cfgfiles = filter(isfile, glob('IPython/UserConfig/*')) |
|
157 | cfgfiles = filter(isfile, glob('IPython/UserConfig/*')) |
@@ -220,11 +220,12 b' def find_scripts():' | |||||
220 | """ |
|
220 | """ | |
221 | scripts = ['IPython/kernel/scripts/ipengine', |
|
221 | scripts = ['IPython/kernel/scripts/ipengine', | |
222 | 'IPython/kernel/scripts/ipcontroller', |
|
222 | 'IPython/kernel/scripts/ipcontroller', | |
223 |
|
|
223 | 'IPython/kernel/scripts/ipcluster', | |
224 | 'scripts/ipython', |
|
224 | 'scripts/ipython', | |
225 | 'scripts/ipythonx', |
|
225 | 'scripts/ipythonx', | |
226 | 'scripts/pycolor', |
|
226 | 'scripts/pycolor', | |
227 | 'scripts/irunner', |
|
227 | 'scripts/irunner', | |
|
228 | 'scripts/iptest', | |||
228 | ] |
|
229 | ] | |
229 |
|
230 | |||
230 | # Script to be run by the windows binary installer after the default setup |
|
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