MCPcopy
hub / github.com/sphinx-doc/sphinx / TestCode

Class TestCode

sphinx/ext/doctest.py:235–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233
234
235class 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
257class SphinxDocTestRunner(doctest.DocTestRunner):

Callers 1

test_docMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_docMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…