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)
| 117 | |
| 118 | |
| 119 | def 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) |
nothing calls this directly
no test coverage detected