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)
| 554 | or `None` if the string is unavailable. |
| 555 | """ |
| 556 | def __init__(self, examples, globs, name, filename, lineno, docstring): |
| 557 | """ |
| 558 | Create a new DocTest containing the given examples. The |
| 559 | DocTest's globals are initialized with a copy of `globs`. |
| 560 | """ |
| 561 | assert not isinstance(examples, str), \ |
| 562 | "DocTest no longer accepts str; use DocTestParser instead" |
| 563 | self.examples = examples |
| 564 | self.docstring = docstring |
| 565 | self.globs = globs.copy() |
| 566 | self.name = name |
| 567 | self.filename = filename |
| 568 | self.lineno = lineno |
| 569 | |
| 570 | def __repr__(self): |
| 571 | if len(self.examples) == 0: |
nothing calls this directly
no test coverage detected