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

[GeoMechanicsApplication] Added messages to some test assertions #12523

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

avdg81
Copy link
Contributor

@avdg81 avdg81 commented Jul 10, 2024

📝 Description
Added messages to some test assertions.

@avdg81 avdg81 added the GeoMechanics Issues related to the GeoMechanicsApplication label Jul 10, 2024
@avdg81 avdg81 requested a review from rfaasse July 10, 2024 08:21
@avdg81 avdg81 self-assigned this Jul 10, 2024
Copy link
Contributor

@rfaasse rfaasse left a comment

Choose a reason for hiding this comment

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

Nice improvement, very minor suggestion, but also feel free to leave it and merge the PR


stage_nr = 3
for idx,node in enumerate(nodal_coordinates_stages[stage_nr]):
self.assertAlmostEqual(displacement_stages[stage_nr][idx][0], -eps*node[0])
self.assertAlmostEqual(displacement_stages[stage_nr][idx][0], -eps*node[0], msg = f"u_x at node {idx + 1} in stage {stage_nr + 1}")
Copy link
Contributor

Choose a reason for hiding this comment

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

We might make a function to get the message, because it is already parametrized with the stage and node id, but copied 4 times, but I leave that up to you.

@avdg81 avdg81 merged commit 6b8bee3 into master Jul 10, 2024
11 checks passed
@avdg81 avdg81 deleted the geo/improved-test-failure-messages branch July 10, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GeoMechanics Issues related to the GeoMechanicsApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants