Method
__init__
(self, source, want, exc_msg=None, lineno=0, indent=0,
options=None)
Source from the content-addressed store, hash-verified
| 491 | DocTestRunner's optionflags). By default, no options are set. |
| 492 | """ |
| 493 | def __init__(self, source, want, exc_msg=None, lineno=0, indent=0, |
| 494 | options=None): |
| 495 | # Normalize inputs. |
| 496 | if not source.endswith('\n'): |
| 497 | source += '\n' |
| 498 | if want and not want.endswith('\n'): |
| 499 | want += '\n' |
| 500 | if exc_msg is not None and not exc_msg.endswith('\n'): |
| 501 | exc_msg += '\n' |
| 502 | # Store properties. |
| 503 | self.source = source |
| 504 | self.want = want |
| 505 | self.lineno = lineno |
| 506 | self.indent = indent |
| 507 | if options is None: options = {} |
| 508 | self.options = options |
| 509 | self.exc_msg = exc_msg |
| 510 | |
| 511 | def __eq__(self, other): |
| 512 | if type(self) is not type(other): |
Tested by
no test coverage detected