1010import threading
1111import time
1212import traceback
13- from _colorize import decolor # type: ignore[import-not-found]
1413from typing import Any , Literal , TextIO
1514
1615from test import support
@@ -520,11 +519,6 @@ def __init__(self, num_workers: int, runtests: RunTests,
520519 else :
521520 self .worker_timeout = None
522521 self .workers : list [WorkerThread ] = []
523- # On GitHub Actions, fold the first run's log into groups: ranges of
524- # passing tests, and one group per failed test. Re-runs aren't folded.
525- self .github_groups = (not runtests .rerun
526- and bool (os .environ .get ("GITHUB_STEP_SUMMARY" )))
527- self .in_github_group = False
528522
529523 jobs = self .runtests .get_jobs ()
530524 if jobs is not None :
@@ -617,16 +611,7 @@ def _process_result(self, item: QueueOutput) -> TestResult:
617611 self .test_index += 1
618612 mp_result = item [1 ]
619613 result = mp_result .result
620- failed = result .is_failed (self .runtests .fail_env_changed )
621- if self .github_groups and failed :
622- # Keep the failure annotation out of collapsed groups
623- self .github_group (None )
624614 self .results .accumulate_result (result , self .runtests )
625- if self .github_groups :
626- if failed :
627- self .github_group (decolor (str (result )))
628- elif not self .in_github_group :
629- self .github_group (f"Tests from #{ self .test_index } " )
630615 self .display_result (mp_result )
631616
632617 # Display worker stdout
@@ -639,19 +624,9 @@ def _process_result(self, item: QueueOutput) -> TestResult:
639624 stdout = mp_result .worker_stdout
640625 if stdout :
641626 print (stdout , flush = True )
642- if self .github_groups and failed :
643- self .github_group (None )
644627
645628 return result
646629
647- def github_group (self , title : str | None ) -> None :
648- """End the current GitHub Actions log group, start a new one if title."""
649- if self .in_github_group :
650- print ("::endgroup::" , flush = True )
651- self .in_github_group = title is not None
652- if title is not None :
653- print (f"::group::{ title } " , flush = True )
654-
655630 def get_mem_usage (self ):
656631 usage = 0
657632 main_mem = get_process_memory_usage (os .getpid ())
@@ -684,7 +659,6 @@ def run(self) -> None:
684659 print ()
685660 self .results .interrupted = True
686661 finally :
687- self .github_group (None )
688662 if self .timeout is not None :
689663 faulthandler .cancel_dump_traceback_later ()
690664
0 commit comments