| 155 | |
| 156 | |
| 157 | class ReprFailDoctest(TerminalRepr): |
| 158 | def __init__( |
| 159 | self, reprlocation_lines: Sequence[Tuple[ReprFileLocation, Sequence[str]]] |
| 160 | ) -> None: |
| 161 | self.reprlocation_lines = reprlocation_lines |
| 162 | |
| 163 | def toterminal(self, tw: TerminalWriter) -> None: |
| 164 | for reprlocation, lines in self.reprlocation_lines: |
| 165 | for line in lines: |
| 166 | tw.line(line) |
| 167 | reprlocation.toterminal(tw) |
| 168 | |
| 169 | |
| 170 | class MultipleDoctestFailures(Exception): |