##// END OF EJS Templates
Fix doctests in IPython.testing
Thomas Kluyver -
Show More
@@ -17,10 +17,10 b' def pyfunc():'
17 17 5
18 18
19 19 >>> for i in range(3):
20 ... print i,
21 ... print i+1,
20 ... print(i, end=' ')
21 ... print(i+1, end=' ')
22 22 ...
23 0 1 1 2 2 3
23 0 1 1 2 2 3
24 24 """
25 25 return 'pyfunc'
26 26
@@ -34,10 +34,10 b' def ipfunc():'
34 34 Out[3]: 5
35 35
36 36 In [26]: for i in range(3):
37 ....: print i,
38 ....: print i+1,
37 ....: print(i, end=' ')
38 ....: print(i+1, end=' ')
39 39 ....:
40 0 1 1 2 2 3
40 0 1 1 2 2 3
41 41
42 42
43 43 Examples that access the operating system work:
@@ -59,7 +59,7 b' def ipfunc():'
59 59 In [7]: 'hi'
60 60 Out[7]: 'hi'
61 61
62 In [8]: print repr(_)
62 In [8]: print(repr(_))
63 63 'hi'
64 64
65 65 In [7]: 3+4
@@ -135,7 +135,7 b' def iprand():'
135 135 In [7]: 3+4
136 136 Out[7]: 7
137 137
138 In [8]: print 'hello'
138 In [8]: print('hello')
139 139 world # random
140 140
141 141 In [9]: iprand()
@@ -152,13 +152,10 b' def iprand_all():'
152 152 In [7]: 1
153 153 Out[7]: 99
154 154
155 In [8]: print 'hello'
155 In [8]: print('hello')
156 156 world
157 157
158 158 In [9]: iprand_all()
159 159 Out[9]: 'junk'
160 160 """
161 161 return 'iprand_all'
162
163
164
@@ -16,10 +16,10 b' def pyfunc():'
16 16 5
17 17
18 18 >>> for i in range(3):
19 ... print i,
20 ... print i+1,
19 ... print(i, end=' ')
20 ... print(i+1, end=' ')
21 21 ...
22 0 1 1 2 2 3
22 0 1 1 2 2 3
23 23 """
24 24 return 'pyfunc'
25 25
@@ -337,8 +337,8 b' class AssertPrints(object):'
337 337 Examples
338 338 --------
339 339 >>> with AssertPrints("abc", suppress=False):
340 ... print "abcd"
341 ... print "def"
340 ... print("abcd")
341 ... print("def")
342 342 ...
343 343 abcd
344 344 def
General Comments 0
You need to be logged in to leave comments. Login now