MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_exception

Method test_exception

Lib/test/test_pyexpat.py:462–476  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

_test_exceptionMethod · 0.95
isdirMethod · 0.45

Tested by

no test coverage detected