Skip to content

Conversation

@mgorny
Copy link
Contributor

@mgorny mgorny commented Dec 20, 2025

Fix pandas/tests/config/test_config.py::TestConfig::test_case_insensitive to use pytest.warns() when checking for warnings instead of incorrect pytest.raises(). This fixes running the test suite without -Werror.

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.
  • If I used AI to develop this pull request, I prompted it to follow AGENTS.md.

Fix
`pandas/tests/config/test_config.py::TestConfig::test_case_insensitive`
to use `pytest.warns()` when checking for warnings instead of incorrect
`pytest.raises()`. This fixes running the test suite without `-Werror`.

Signed-off-by: Michał Górny <[email protected]>
@rhshadrach rhshadrach added the Testing pandas testing functions or related to the test suite label Dec 20, 2025
@rhshadrach rhshadrach added this to the 3.0 milestone Dec 20, 2025
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

lgtm

@rhshadrach rhshadrach merged commit 65c708c into pandas-dev:main Dec 20, 2025
47 checks passed
@rhshadrach
Copy link
Member

Thanks @mgorny!

@mgorny mgorny deleted the test-warns branch December 20, 2025 19:33
@mgorny
Copy link
Contributor Author

mgorny commented Dec 20, 2025

Thanks!

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

Labels

Testing pandas testing functions or related to the test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants