Skip to content

TST: Remove match= in test_setitem_invalid to avoid PytestWarning - #61577

Merged
mroeschke merged 4 commits into
pandas-dev:mainfrom
iabhi4:fix61557
Jun 13, 2025
Merged

mroeschke merged 4 commits into
pandas-dev:mainfrom
iabhi4:fix61557

Conversation

@iabhi4

@iabhi4 iabhi4 commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

test only change - This PR removes the use of match="" in test_setitem_invalid within base/setitem.py.

Using an empty string as a match pattern triggers a PytestWarning in newer versions of pytest, so the match argument has been removed since the message was not being validated

Comment thread pandas/tests/extension/base/setitem.py Resolved
@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Jun 6, 2025

@rhshadrach rhshadrach left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@rhshadrach rhshadrach added this to the 3.0 milestone Jun 8, 2025

@datapythonista datapythonista left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Personally I'd just remove the match parameter (unless we have a check to make sure it exists).

But either way this looks good, thanks for taking care of it @iabhi4.

@chalmerlowe

Copy link
Copy Markdown
Contributor

Personally I'd just remove the match parameter (unless we have a check to make sure it exists).

But either way this looks good, thanks for taking care of it @iabhi4.

I tend to agree with @datapythonista, unless there is a specific check that we are looking for and in this case it does not appear to be, I would leave out the match parameter.

with pytest.raises((ValueError, TypeError)):

@datapythonista

Copy link
Copy Markdown
Member

@mroeschke I think the changes you requested have been implemented, this should be ready to merge

@mroeschke
mroeschke merged commit 257b820 into pandas-dev:main Jun 13, 2025
@mroeschke

Copy link
Copy Markdown
Member

Thanks @iabhi4

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.

BUG: regex match in compliance tests no longer match pytest expected inputs

5 participants