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

Test signal #315

Open
hartbit opened this issue May 3, 2023 · 1 comment
Open

Test signal #315

hartbit opened this issue May 3, 2023 · 1 comment

Comments

@hartbit
Copy link

hartbit commented May 3, 2023

Is there a way to test that a test terminates with a particular signal ? I want to test my functions abort when expected.

@thoni56
Copy link
Contributor

thoni56 commented May 10, 2023

If you mean signals like SIGHUP, SIGINT etc. no there isn't. The only thing that happens after a test has exited is to check for expected calls to match. If a test aborts using a signal you will get a test exception and a reporter call indicating this.

I think it would be possible to add a new type of assertions that would make that possible, but currently no.

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

2 participants