MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __init__

Method __init__

tools/python-3.11.9-amd64/Lib/doctest.py:529–541  ·  view source on GitHub ↗

Create a new DocTest containing the given examples. The DocTest's globals are initialized with a copy of `globs`.

(self, examples, globs, name, filename, lineno, docstring)

Source from the content-addressed store, hash-verified

527 or `None` if the string is unavailable.
528 """
529 def __init__(self, examples, globs, name, filename, lineno, docstring):
530 """
531 Create a new DocTest containing the given examples. The
532 DocTest's globals are initialized with a copy of `globs`.
533 """
534 assert not isinstance(examples, str), \
535 "DocTest no longer accepts str; use DocTestParser instead"
536 self.examples = examples
537 self.docstring = docstring
538 self.globs = globs.copy()
539 self.name = name
540 self.filename = filename
541 self.lineno = lineno
542
543 def __repr__(self):
544 if len(self.examples) == 0:

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected