Check examples in any *.rst located inside `base_path`. Add the output to `results`. See Also -------- check_doctests_testfile
(base_path, results, args, dots)
| 1067 | |
| 1068 | |
| 1069 | def check_documentation(base_path, results, args, dots): |
| 1070 | """ |
| 1071 | Check examples in any *.rst located inside `base_path`. |
| 1072 | Add the output to `results`. |
| 1073 | |
| 1074 | See Also |
| 1075 | -------- |
| 1076 | check_doctests_testfile |
| 1077 | """ |
| 1078 | for filename in iter_included_files(base_path, args.verbose): |
| 1079 | if dots: |
| 1080 | sys.stderr.write(filename + ' ') |
| 1081 | sys.stderr.flush() |
| 1082 | |
| 1083 | tut_results = check_doctests_testfile( |
| 1084 | filename, |
| 1085 | (args.verbose >= 2), dots=dots, |
| 1086 | doctest_warnings=args.doctest_warnings) |
| 1087 | |
| 1088 | # stub out a "module" which is needed when reporting the result |
| 1089 | def scratch(): |
| 1090 | pass |
| 1091 | scratch.__name__ = filename |
| 1092 | results.append((scratch, tut_results)) |
| 1093 | if dots: |
| 1094 | sys.stderr.write('\n') |
| 1095 | sys.stderr.flush() |
| 1096 | |
| 1097 | |
| 1098 | def init_matplotlib(): |
no test coverage detected