File tree 1 file changed +11
-6
lines changed
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -253,12 +253,17 @@ def _runTest(self) -> None:
253
253
self ._linter .check (modules_to_check )
254
254
expected_messages , expected_output = self ._get_expected ()
255
255
actual_messages , actual_output = self ._get_actual ()
256
- self ._check_output_text (expected_messages , expected_output , actual_output )
257
- assert (
258
- expected_messages == actual_messages
259
- ), self .error_msg_for_unequal_messages (
260
- actual_messages , expected_messages , actual_output
261
- )
256
+ try :
257
+ assert (
258
+ expected_messages == actual_messages
259
+ ), self .error_msg_for_unequal_messages (
260
+ actual_messages , expected_messages , actual_output
261
+ )
262
+ except AssertionError :
263
+ raise
264
+ finally :
265
+ # _check_output_text is always ran in case we are updating expected output file
266
+ self ._check_output_text (expected_messages , expected_output , actual_output )
262
267
263
268
def error_msg_for_unequal_messages (
264
269
self ,
You can’t perform that action at this time.
0 commit comments