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_throws: don't throw an error if the same field is undefined in both the observed exception and the expected exception #54084

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DilumAluthge
Copy link
Member

@DilumAluthge DilumAluthge commented Apr 14, 2024

Fixes #54082
Alternative to #54083


This is another possible way to fix #54082.

…n both the observed exception and the expected exception
@DilumAluthge DilumAluthge marked this pull request as ready for review April 14, 2024 21:16
@martinholters
Copy link
Member

Could use a test. And that would probably reveal that this does not fix #54082 IIUC, as in that case, the thrown exception has .scope set while it is #undef in the expected one. So for the test case of #54082, what used to be a passing test would be "fixed" to be a failing test instead of thrown exception. (Similarly for #54032, btw.) Or am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:error handling Handling of exceptions by Julia or the user testsystem The unit testing framework and Test stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change in behavior of UndefVarError(::Symbol) constructor breaks @test_throws in 1.11.0-beta1
3 participants