(text)
| 363 | |
| 364 | |
| 365 | def contains_doctest(text): |
| 366 | try: |
| 367 | # check if it's valid Python as-is |
| 368 | compile(text, '<string>', 'exec') |
| 369 | return False |
| 370 | except SyntaxError: |
| 371 | pass |
| 372 | r = re.compile(r'^\s*>>>', re.M) |
| 373 | m = r.search(text) |
| 374 | return bool(m) |
| 375 | |
| 376 | |
| 377 | def _split_code_at_show(text, function_name): |
no test coverage detected
searching dependent graphs…