##// END OF EJS Templates
fix prompt separators for doctests
fperez -
Show More
@@ -27,13 +27,11 b' def main():'
27 27 o.prompt_in2 = '... '
28 28 o.prompt_out = ''
29 29
30 # No separation between successive inputs
31 o.separate_in = ''
30 # Add a blank line before each new set of inputs. This is needed by
31 # doctest to distinguish each test from the next.
32 o.separate_in = '\n'
32 33 o.separate_out = ''
33 # But add a blank line after any output, to help separate doctests from
34 # each other. This is needed by doctest to distinguish each test from the
35 # next.
36 o.separate_out2 = '\n'
34 o.separate_out2 = ''
37 35
38 36 # Disable pprint, so that outputs are printed as similarly to standard
39 37 # python as possible
@@ -1,7 +1,7 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Magic functions for InteractiveShell.
3 3
4 $Id: Magic.py 2601 2007-08-10 07:01:29Z fperez $"""
4 $Id: Magic.py 2607 2007-08-13 13:25:24Z fperez $"""
5 5
6 6 #*****************************************************************************
7 7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
@@ -2964,17 +2964,17 b' Defaulting color scheme to \'NoColor\'"""'
2964 2964 oc.prompt2.p_template = '... '
2965 2965 oc.prompt_out.p_template = ''
2966 2966
2967 oc.prompt1.sep = ''
2968 oc.prompt_out.output_sep = ''
2969 oc.prompt_out.output_sep2 = '\n'
2967 oc.prompt1.sep = '\n'
2968 oc.output_sep = ''
2969 oc.output_sep2 = ''
2970 2970
2971 2971 oc.prompt1.pad_left = oc.prompt2.pad_left = \
2972 2972 oc.prompt_out.pad_left = False
2973 2973
2974 shell.magic_xmode('Plain')
2975
2976 2974 rc.pprint = False
2977 2975
2976 shell.magic_xmode('Plain')
2977
2978 2978 else:
2979 2979 # turn off
2980 2980 ipaste.deactivate_prefilter()
@@ -2984,15 +2984,16 b' Defaulting color scheme to \'NoColor\'"""'
2984 2984 oc.prompt_out.p_template = rc.prompt_out
2985 2985
2986 2986 oc.prompt1.sep = dstore.rc_separate_in
2987 oc.prompt_out.output_sep = dstore.rc_separate_out
2988 oc.prompt_out.output_sep2 = dstore.rc_separate_out2
2987 oc.output_sep = dstore.rc_separate_out
2988 oc.output_sep2 = dstore.rc_separate_out2
2989 2989
2990 2990 oc.prompt1.pad_left = oc.prompt2.pad_left = \
2991 2991 oc.prompt_out.pad_left = dstore.rc_prompts_pad_left
2992 shell.magic_xmode(dstore.xmode)
2993 2992
2994 2993 rc.pprint = dstore.rc_pprint
2995 2994
2995 shell.magic_xmode(dstore.xmode)
2996
2996 2997 # Store new mode and inform
2997 2998 dstore.mode = bool(1-int(mode))
2998 2999 print 'Doctest mode is:',
@@ -1,7 +1,7 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Release data for the IPython project.
3 3
4 $Id: Release.py 2602 2007-08-12 22:45:38Z fperez $"""
4 $Id: Release.py 2607 2007-08-13 13:25:24Z fperez $"""
5 5
6 6 #*****************************************************************************
7 7 # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
@@ -22,7 +22,7 b" name = 'ipython'"
22 22 # because bdist_rpm does not accept dashes (an RPM) convention, and
23 23 # bdist_deb does not accept underscores (a Debian convention).
24 24
25 revision = '2601'
25 revision = '2606'
26 26
27 27 version = '0.8.2.svn.r' + revision.rstrip('M')
28 28
@@ -1,5 +1,9 b''
1 1 2007-08-13 Fernando Perez <Fernando.Perez@colorado.edu>
2 2
3 * IPython/Magic.py (magic_doctest_mode): fix prompt separators in
4 doctest profile and %doctest_mode, so they actually generate the
5 blank lines needed by doctest to separate individual tests.
6
3 7 * IPython/iplib.py (safe_execfile): modify so that running code
4 8 which calls sys.exit(0) (or equivalently, raise SystemExit(0))
5 9 doesn't get a printed traceback. Any other value in sys.exit(),
General Comments 0
You need to be logged in to leave comments. Login now