(self)
| 602 | return importasmod |
| 603 | |
| 604 | def test_repr_source(self): |
| 605 | pr = ExceptionInfoFormatter() |
| 606 | source = _pytest._code.Source( |
| 607 | class="st">"""\ |
| 608 | def f(x): |
| 609 | pass |
| 610 | class="st">""" |
| 611 | ).strip() |
| 612 | pr.flow_marker = class="st">"|" class="cm"># type: ignore[misc] |
| 613 | lines = pr.get_source(source, 0) |
| 614 | assert len(lines) == 2 |
| 615 | assert lines[0] == class="st">"| def f(x):" |
| 616 | assert lines[1] == class="st">" pass" |
| 617 | |
| 618 | def test_repr_source_out_of_bounds(self): |
| 619 | pr = ExceptionInfoFormatter() |
nothing calls this directly
no test coverage detected