@@ -25,7 +25,7 @@ def __init__(self):
25
25
self .env_changed : TestList = []
26
26
self .run_no_tests : TestList = []
27
27
self .rerun : TestList = []
28
- self .bad_results : list [TestResult ] = []
28
+ self .rerun_results : list [TestResult ] = []
29
29
30
30
self .interrupted : bool = False
31
31
self .test_times : list [tuple [float , TestName ]] = []
@@ -87,6 +87,7 @@ def accumulate_result(self, result: TestResult, runtests: RunTests):
87
87
self .good .append (test_name )
88
88
case State .ENV_CHANGED :
89
89
self .env_changed .append (test_name )
90
+ self .rerun_results .append (result )
90
91
case State .SKIPPED :
91
92
self .skipped .append (test_name )
92
93
case State .RESOURCE_DENIED :
@@ -98,7 +99,7 @@ def accumulate_result(self, result: TestResult, runtests: RunTests):
98
99
case _:
99
100
if result .is_failed (fail_env_changed ):
100
101
self .bad .append (test_name )
101
- self .bad_results .append (result )
102
+ self .rerun_results .append (result )
102
103
else :
103
104
raise ValueError (f"invalid test state: { result .state !r} " )
104
105
@@ -114,12 +115,12 @@ def accumulate_result(self, result: TestResult, runtests: RunTests):
114
115
self .add_junit (xml_data )
115
116
116
117
def need_rerun (self ):
117
- return bool (self .bad_results )
118
+ return bool (self .rerun_results )
118
119
119
120
def prepare_rerun (self ) -> tuple [TestTuple , FilterDict ]:
120
121
tests : TestList = []
121
122
match_tests_dict = {}
122
- for result in self .bad_results :
123
+ for result in self .rerun_results :
123
124
tests .append (result .test_name )
124
125
125
126
match_tests = result .get_rerun_match_tests ()
@@ -130,7 +131,8 @@ def prepare_rerun(self) -> tuple[TestTuple, FilterDict]:
130
131
# Clear previously failed tests
131
132
self .rerun_bad .extend (self .bad )
132
133
self .bad .clear ()
133
- self .bad_results .clear ()
134
+ self .env_changed .clear ()
135
+ self .rerun_results .clear ()
134
136
135
137
return (tuple (tests ), match_tests_dict )
136
138
0 commit comments