Skip to content

fix: set ok=False when TestAbortAll is raised in run_suite_class#1006

Open
devimano2011 wants to merge 1 commit intogoogle:masterfrom
devimano2011:fix/set-ok-false-on-test-abort-all
Open

fix: set ok=False when TestAbortAll is raised in run_suite_class#1006
devimano2011 wants to merge 1 commit intogoogle:masterfrom
devimano2011:fix/set-ok-false-on-test-abort-all

Conversation

@devimano2011
Copy link
Copy Markdown

Related to #950 and #960

Problem

In run_suite_class() in suite_runner.py, when signals.TestAbortAll is raised, the except block only has pass and does not set ok = False. This means if a test aborts before any failures, the suite exits with code 0 instead of 1.

This is the same issue that was fixed in test_runner.py by PR #997 for issue #960, but run_suite_class() in suite_runner.py was missed.

Fix

Change pass to ok = False in the except signals.TestAbortAll block so that aborting a test suite always results in a non-zero exit code.

Set ok to False when TestAbortAll is caught to indicate failure.
@google-cla
Copy link
Copy Markdown

google-cla Bot commented Apr 30, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant