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

Not catching the SystemExit exception #73

Closed
danodonovan opened this issue Mar 6, 2017 · 1 comment
Closed

Not catching the SystemExit exception #73

danodonovan opened this issue Mar 6, 2017 · 1 comment

Comments

@danodonovan
Copy link

PyHamcrest==1.9.0

I'm having trouble catching the SystemExit exception with calling, raises. Example gist

https://gist.github.com/danodonovan/042e1c74ea76cbea39b42f5c8733ede0

Briefly;

def call_exit():
    raise SystemExit

assert_that(calling(call_exit), raises(SystemExit))

fails as SystemExit is called, rather than caught.

@brunns
Copy link
Member

brunns commented Feb 15, 2019

I think this can be closed, @offbyone.

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

No branches or pull requests

3 participants