Skip to content

Conversation

@erikvansebille
Copy link
Member

Fixing the compilation error message when a local Kernel variable has same name as a FieldSet constant

This fixes #1512

assert error_thrown


def test_varname_as_fieldname():
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use pytest.raises(Exception). It is a much easier way to test that the code raise exception.

See also: https://stackoverflow.com/questions/23337471/how-do-i-properly-assert-that-an-exception-gets-raised-in-pytest

@erikvansebille erikvansebille merged commit a8aeca8 into master May 1, 2024
@erikvansebille erikvansebille deleted the fix_variabele_as_fieldset_constant_errormessage branch May 1, 2024 05:52
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.

Confusing compilation error message when variable in Kernel has same name as FieldSet constant

3 participants