Show More
@@ -123,3 +123,37 b' def random_all():' | |||
|
123 | 123 | blah... |
|
124 | 124 | """ |
|
125 | 125 | pass |
|
126 | ||
|
127 | ||
|
128 | def iprand(): | |
|
129 | """Some ipython tests with random output. | |
|
130 | ||
|
131 | In [7]: 3+4 | |
|
132 | Out[7]: 7 | |
|
133 | ||
|
134 | In [8]: print 'hello' | |
|
135 | world # random | |
|
136 | ||
|
137 | In [9]: iprand() | |
|
138 | Out[9]: 'iprand' | |
|
139 | """ | |
|
140 | return 'iprand' | |
|
141 | ||
|
142 | ||
|
143 | def iprand_all(): | |
|
144 | """Some ipython tests with fully random output. | |
|
145 | ||
|
146 | # all-random | |
|
147 | ||
|
148 | In [7]: 1 | |
|
149 | Out[7]: 99 | |
|
150 | ||
|
151 | In [8]: print 'hello' | |
|
152 | world | |
|
153 | ||
|
154 | In [9]: iprand_all() | |
|
155 | Out[9]: 'junk' | |
|
156 | """ | |
|
157 | return 'iprand_all' | |
|
158 | ||
|
159 |
@@ -220,8 +220,6 b' class DocTestFinder(doctest.DocTestFinder):' | |||
|
220 | 220 | if inspect.isclass(obj) and self._recurse: |
|
221 | 221 | #print 'RECURSE into class:',obj # dbg |
|
222 | 222 | for valname, val in obj.__dict__.items(): |
|
223 | #valname1 = '%s.%s' % (name, valname) # dbg | |
|
224 | #print 'N',name,'VN:',valname,'val:',str(val)[:77] # dbg | |
|
225 | 223 | # Special handling for staticmethod/classmethod. |
|
226 | 224 | if isinstance(val, staticmethod): |
|
227 | 225 | val = getattr(obj, valname) |
@@ -300,8 +298,6 b' class DocTestCase(doctests.DocTestCase):' | |||
|
300 | 298 | |
|
301 | 299 | # Modified runTest from the default stdlib |
|
302 | 300 | def runTest(self): |
|
303 | #print 'HERE!' # dbg | |
|
304 | ||
|
305 | 301 | test = self._dt_test |
|
306 | 302 | old = sys.stdout |
|
307 | 303 | new = StringIO() |
@@ -481,7 +477,6 b' class IPDocTestParser(doctest.DocTestParser):' | |||
|
481 | 477 | |
|
482 | 478 | # Create an Example, and add it to the list. |
|
483 | 479 | if not self._IS_BLANK_OR_COMMENT(source): |
|
484 | #print 'Example source:', source # dbg | |
|
485 | 480 | output.append(Example(source, want, exc_msg, |
|
486 | 481 | lineno=lineno, |
|
487 | 482 | indent=min_indent+len(m.group('indent')), |
General Comments 0
You need to be logged in to leave comments.
Login now