Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider KeyboardInterrupt/SystemExit at collection time #12191

Merged
merged 11 commits into from May 2, 2024

Conversation

anitahammer
Copy link
Contributor

Screenshot from 2024-04-06 21-48-46

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @anitahammer indeed this is a much better UX.

Could you please also:

  1. Add a test for this to ensure we do not regress in the future. Probably a simple way to simulate this is to make a module raise KeyboardInterrupt during import and check that the session was interrupted and the message !!! KeyboardInterrupt !!!!!!!!! showed up.
  2. Add a CHANGELOG entry
  3. Add yourself to AUTHORS (optional)

Weather: overcast clouds
Weather: overcast clouds
Weather: overcast clouds
@anitahammer
Copy link
Contributor Author

Thank you for the feedback @nicoddemus ! I've added a test case and verified that it was failing before my changes.

Weather: overcast clouds
@RonnyPfannschmidt RonnyPfannschmidt changed the title Update runner.py Consider KeyboardInterrupt/SystemExit at collection time Apr 8, 2024
@anitahammer
Copy link
Contributor Author

Hi @nicoddemus

@nicoddemus
Copy link
Member

Thanks @anitahammer for the ping!

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @anitahammer!

@nicoddemus nicoddemus enabled auto-merge (squash) May 2, 2024 11:45
@nicoddemus nicoddemus merged commit 9761006 into pytest-dev:main May 2, 2024
24 checks passed
@nicoddemus nicoddemus added the backport 8.2.x Apply on merged PRs, backports the changes to the 8.2.x branch label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 8.2.x Apply on merged PRs, backports the changes to the 8.2.x branch
Projects
None yet
2 participants