Skip to content

Conversation

@mgorny
Copy link
Contributor

@mgorny mgorny commented Aug 27, 2024

Change Summary

Fix new tests to use the correct pytest.warns() function to assert for warnings, rather than pytest.raises(). This fixes testing without -Werror.

Related issue number

n/a

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @sydney-runkle

Fix new tests to use the correct `pytest.warns()` function to assert
for warnings, rather than `pytest.raises()`.  This fixes testing
without `-Werror`.
@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Aug 27, 2024
@codspeed-hq
Copy link

codspeed-hq bot commented Aug 27, 2024

CodSpeed Performance Report

Merging #10241 will not alter performance

Comparing mgorny:test-warn-assert (dd7ed4b) with main (714c0df)

Summary

✅ 17 untouched benchmarks

@github-actions
Copy link
Contributor

Coverage report

Image Image

This PR does not seem to contain any modification to coverable code.

@mgorny
Copy link
Contributor Author

mgorny commented Aug 27, 2024

please review

Copy link
Member

@Viicos Viicos left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution

@Viicos Viicos merged commit ed8df66 into pydantic:main Aug 27, 2024
@mgorny mgorny deleted the test-warn-assert branch August 27, 2024 07:41
@mgorny
Copy link
Contributor Author

mgorny commented Aug 27, 2024

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants