Perform a specialized doctest.
(self, decorator, input_lines, found, submitted)
| 863 | return output |
| 864 | |
| 865 | def custom_doctest(self, decorator, input_lines, found, submitted): |
| 866 | """ |
| 867 | Perform a specialized doctest. |
| 868 | |
| 869 | """ |
| 870 | from .custom_doctests import doctests |
| 871 | |
| 872 | args = decorator.split() |
| 873 | doctest_type = args[1] |
| 874 | if doctest_type in doctests: |
| 875 | doctests[doctest_type](self, args, input_lines, found, submitted) |
| 876 | else: |
| 877 | e = "Invalid option to @doctest: {0}".format(doctest_type) |
| 878 | raise Exception(e) |
| 879 | |
| 880 | |
| 881 | class IPythonDirective(Directive): |