| 233 | |
| 234 | |
| 235 | class TestCode: |
| 236 | def __init__( |
| 237 | self, |
| 238 | code: str, |
| 239 | type: str, |
| 240 | filename: str, |
| 241 | lineno: int, |
| 242 | options: dict[int, bool] | None = None, |
| 243 | ) -> None: |
| 244 | self.code = code |
| 245 | self.type = type |
| 246 | self.filename = filename |
| 247 | self.lineno = lineno |
| 248 | self.options: dict[int, bool] = options or {} |
| 249 | |
| 250 | def __repr__(self) -> str: |
| 251 | return ( |
| 252 | f'TestCode({self.code!r}, {self.type!r}, filename={self.filename!r}, ' |
| 253 | f'lineno={self.lineno!r}, options={self.options!r})' |
| 254 | ) |
| 255 | |
| 256 | |
| 257 | class SphinxDocTestRunner(doctest.DocTestRunner): |