(self)
| 460 | |
| 461 | @support.cpython_only |
| 462 | def test_exception(self): |
| 463 | # gh-66652: test _PyTraceback_Add() used by pyexpat.c to inject frames |
| 464 | |
| 465 | # Change the current directory to the Python source code directory |
| 466 | # if it is available. |
| 467 | src_dir = sysconfig.get_config_var('abs_builddir') |
| 468 | if src_dir: |
| 469 | have_source = os.path.isdir(src_dir) |
| 470 | else: |
| 471 | have_source = False |
| 472 | if have_source: |
| 473 | with os_helper.change_cwd(src_dir): |
| 474 | self._test_exception(have_source) |
| 475 | else: |
| 476 | self._test_exception(have_source) |
| 477 | |
| 478 | def _test_exception(self, have_source): |
| 479 | # Use path relative to the current directory which should be the Python |
nothing calls this directly
no test coverage detected