(self)
| 448 | return importasmod |
| 449 | |
| 450 | def test_repr_source(self): |
| 451 | pr = FormattedExcinfo() |
| 452 | source = _pytest._code.Source( |
| 453 | """\ |
| 454 | def f(x): |
| 455 | pass |
| 456 | """ |
| 457 | ).strip() |
| 458 | pr.flow_marker = "|" # type: ignore[misc] |
| 459 | lines = pr.get_source(source, 0) |
| 460 | assert len(lines) == 2 |
| 461 | assert lines[0] == "| def f(x):" |
| 462 | assert lines[1] == " pass" |
| 463 | |
| 464 | def test_repr_source_excinfo(self) -> None: |
| 465 | """Check if indentation is right.""" |
nothing calls this directly
no test coverage detected