MCPcopy Create free account
hub / github.com/bloomberg/pystack / test_extract_executable_from_core

Function test_extract_executable_from_core

tests/integration/test_smoke.py:119–132  ·  view source on GitHub ↗

Generate a core file for a process with a single thread and check that we can extract the executable that was used to create the core file

(tmpdir: Path)

Source from the content-addressed store, hash-verified

117
118
119def test_extract_executable_from_core(tmpdir: Path) -> None:
120 """Generate a core file for a process with a single thread and check
121 that we can extract the executable that was used to create the core file"""
122
123 # WHEN
124 with generate_core_file(
125 Path(sys.executable), TEST_SINGLE_THREAD_FILE, tmpdir
126 ) as core_file:
127 core_map_analyzer = CoreFileAnalyzer(str(core_file))
128 executable = core_map_analyzer.extract_executable()
129
130 # THEN
131
132 assert executable == Path(sys.executable)

Callers

nothing calls this directly

Calls 2

generate_core_fileFunction · 0.90
CoreFileAnalyzerClass · 0.85

Tested by

no test coverage detected