https://github.com/python/cpython/commit/cb2eeed01697bb1a6b29e6dc582e7b172d158b1e commit: cb2eeed01697bb1a6b29e6dc582e7b172d158b1e branch: main author: Doremon <[email protected]> committer: vstinner <[email protected]> date: 2026-11-09T16:26:56Z summary:
gh-160334: Accept special frames in collapsed profiling test (#161515) Co-authored-by: Victor Stinner <[email protected]> files: A Misc/NEWS.d/next/Tests/2026-11-07-01-45-00.gh-issue-160334.F2n8qA.rst M Lib/test/test_profiling/test_sampling_profiler/test_integration.py diff --git a/Lib/test/test_profiling/test_sampling_profiler/test_integration.py b/Lib/test/test_profiling/test_sampling_profiler/test_integration.py index 3487647b76683ee..0b9d55bacc6659c 100644 --- a/Lib/test/test_profiling/test_sampling_profiler/test_integration.py +++ b/Lib/test/test_profiling/test_sampling_profiler/test_integration.py @@ -508,7 +508,10 @@ def test_sampling_with_collapsed_export(self): if ";" in stack_trace: stack_parts = stack_trace.split(";") for part in stack_parts: - # Each part should be file:function:line + # Special frames, such as <GC> and <unreadable frame>, + # do not have file and line information. + if part.startswith("<") and part.endswith(">"): + continue self.assertIn(":", part) def test_sampling_all_threads(self): diff --git a/Misc/NEWS.d/next/Tests/2026-11-07-01-45-00.gh-issue-160334.F2n8qA.rst b/Misc/NEWS.d/next/Tests/2026-11-07-01-45-00.gh-issue-160334.F2n8qA.rst new file mode 100644 index 000000000000000..458f192ce0be77d --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2026-11-07-01-45-00.gh-issue-160334.F2n8qA.rst @@ -0,0 +1,2 @@ +Fix the sampling profiler integration test for special frames without file and +line information. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
