(self, tmp_path: Path, _sys_snapshot)
| 437 | class TestFormattedExcinfo: |
| 438 | @pytest.fixture |
| 439 | def importasmod(self, tmp_path: Path, _sys_snapshot): |
| 440 | def importasmod(source): |
| 441 | source = textwrap.dedent(source) |
| 442 | modpath = tmp_path.joinpath("mod.py") |
| 443 | tmp_path.joinpath("__init__.py").touch() |
| 444 | modpath.write_text(source) |
| 445 | importlib.invalidate_caches() |
| 446 | return import_path(modpath, root=tmp_path) |
| 447 | |
| 448 | return importasmod |
| 449 | |
| 450 | def test_repr_source(self): |
| 451 | pr = FormattedExcinfo() |
nothing calls this directly
no test coverage detected