(self)
| 2219 | test.globs.update(self._dt_globs) |
| 2220 | |
| 2221 | def runTest(self): |
| 2222 | test = self._dt_test |
| 2223 | old = sys.stdout |
| 2224 | new = StringIO() |
| 2225 | optionflags = self._dt_optionflags |
| 2226 | |
| 2227 | if not (optionflags & REPORTING_FLAGS): |
| 2228 | # The option flags don't include any reporting flags, |
| 2229 | # so add the default reporting flags |
| 2230 | optionflags |= _unittest_reportflags |
| 2231 | |
| 2232 | runner = DocTestRunner(optionflags=optionflags, |
| 2233 | checker=self._dt_checker, verbose=False) |
| 2234 | |
| 2235 | try: |
| 2236 | runner.DIVIDER = "-"*70 |
| 2237 | failures, tries = runner.run( |
| 2238 | test, out=new.write, clear_globs=False) |
| 2239 | finally: |
| 2240 | sys.stdout = old |
| 2241 | |
| 2242 | if failures: |
| 2243 | raise self.failureException(self.format_failure(new.getvalue())) |
| 2244 | |
| 2245 | def format_failure(self, err): |
| 2246 | test = self._dt_test |
nothing calls this directly
no test coverage detected