From a9baac70636e889731966d286dfdb6eb9a06df85 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 19 Nov 2026 01:03:48 +0100 Subject: [PATCH 1/2] Display header when running python -m test --tsan When running "python -m test" with --pgo, --tsan or --tsan-parallel, display the test header. --- Lib/test/libregrtest/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py index 032cb94223a7e6..f4e6e2a5bd916c 100644 --- a/Lib/test/libregrtest/main.py +++ b/Lib/test/libregrtest/main.py @@ -207,12 +207,15 @@ def find_tests(self, tests: TestList | None = None) -> tuple[TestTuple, TestList if self.pgo: # add default PGO tests if no tests are specified setup_pgo_tests(self.cmdline_args, self.pgo_extended) + self.want_header = True if self.tsan: setup_tsan_tests(self.cmdline_args) + self.want_header = True if self.tsan_parallel: setup_tsan_parallel_tests(self.cmdline_args) + self.want_header = True alltests = findtests(testdir=self.test_dir, exclude=exclude_tests) From 229f32ad2a7e2a446e0e332ac60fab4a55465bfa Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 19 Nov 2026 13:00:01 +0100 Subject: [PATCH 2/2] Don't show header when using --pgo --- Lib/test/libregrtest/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py index f4e6e2a5bd916c..547ef232c20494 100644 --- a/Lib/test/libregrtest/main.py +++ b/Lib/test/libregrtest/main.py @@ -207,7 +207,6 @@ def find_tests(self, tests: TestList | None = None) -> tuple[TestTuple, TestList if self.pgo: # add default PGO tests if no tests are specified setup_pgo_tests(self.cmdline_args, self.pgo_extended) - self.want_header = True if self.tsan: setup_tsan_tests(self.cmdline_args)