Skip to content

fix: handle pytest.exit gracefully instead of INTERNALERROR#1358

Closed
fazalpsinfo-cmyk wants to merge 1 commit into
pytest-dev:masterfrom
fazalpsinfo-cmyk:fix/pytest-exit-handling-1239
Closed

fix: handle pytest.exit gracefully instead of INTERNALERROR#1358
fazalpsinfo-cmyk wants to merge 1 commit into
pytest-dev:masterfrom
fazalpsinfo-cmyk:fix/pytest-exit-handling-1239

Conversation

@fazalpsinfo-cmyk

Copy link
Copy Markdown

When pytest.exit() is called mid-test, the worker finishes with a pending test (crashitem). The controller's worker_workerfinished asserted not crashitem, turning an intentional exit into an INTERNALERROR.

Replaced the assertion with graceful handle_crashitem, matching the pattern already used in worker_internal_error.

Closes #1239


Support my open source work: https://buymeacoffee.com/muhamedfazalps

When pytest.exit() is called mid-test, the worker finishes with a
pending test (crashitem). The controller's worker_workerfinished
asserted not crashitem, turning an intentional exit into an
INTERNALERROR. Replace the assertion with graceful
handle_crashitem, matching the pattern used in
worker_internal_error.

Closes pytest-dev#1239
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.

pytest.exit causes internal error

2 participants