()
| 383 | |
| 384 | |
| 385 | def test_excinfo_no_sourcecode(): |
| 386 | try: |
| 387 | exec("raise ValueError()") |
| 388 | except ValueError: |
| 389 | excinfo = _pytest._code.ExceptionInfo.from_current() |
| 390 | s = str(excinfo.traceback[-1]) |
| 391 | # TODO: Since Python 3.13b1 under pytest-xdist, the * is `import |
| 392 | # sys;exec(eval(sys.stdin.readline()))` (execnet bootstrap code) |
| 393 | # instead of `???` like before. Is this OK? |
| 394 | fnmatch.fnmatch(s, " File '<string>':1 in <module>\n *\n") |
| 395 | |
| 396 | |
| 397 | def test_excinfo_no_python_sourcecode(tmp_path: Path) -> None: |
nothing calls this directly
no test coverage detected