Show More
@@ -186,13 +186,19 b' def is_extension_module(filename):' | |||
|
186 | 186 | return os.path.splitext(filename)[1].lower() in ('.so','.pyd') |
|
187 | 187 | |
|
188 | 188 | |
|
189 |
class |
|
|
189 | class DocTestSkip(object): | |
|
190 | """Object wrapper for doctests to be skipped.""" | |
|
191 | ||
|
192 | ds_skip = """Doctest to skip. | |
|
193 | >>> 1 #doctest: +SKIP | |
|
194 | """ | |
|
195 | ||
|
190 | 196 | def __init__(self,obj): |
|
191 | 197 | self.obj = obj |
|
192 | 198 | |
|
193 | 199 | def __getattribute__(self,key): |
|
194 | 200 | if key == '__doc__': |
|
195 |
return |
|
|
201 | return DocTestSkip.ds_skip | |
|
196 | 202 | else: |
|
197 | 203 | return getattr(object.__getattribute__(self,'obj'),key) |
|
198 | 204 | |
@@ -236,7 +242,7 b' class DocTestFinder(doctest.DocTestFinder):' | |||
|
236 | 242 | |
|
237 | 243 | if hasattr(obj,"skip_doctest"): |
|
238 | 244 | #print 'SKIPPING DOCTEST FOR:',obj # dbg |
|
239 |
obj = |
|
|
245 | obj = DocTestSkip(obj) | |
|
240 | 246 | |
|
241 | 247 | doctest.DocTestFinder._find(self,tests, obj, name, module, |
|
242 | 248 | source_lines, globs, seen) |
General Comments 0
You need to be logged in to leave comments.
Login now