Skip to content

Conversation

@dannyi96
Copy link
Contributor


def test_pandas_dtype_numpy_warning():
# GH#51523
with warnings.catch_warnings(record=True) as w:
Copy link
Member

Choose a reason for hiding this comment

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

can you do tm.assert_produces_warning() instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure thing, I've updated the testcase.

@phofl phofl added this to the 2.0 milestone Mar 13, 2023
@phofl phofl added the Warnings Warnings that appear or should be added to pandas label Mar 13, 2023
@mroeschke mroeschke merged commit 7c84082 into pandas-dev:main Mar 14, 2023
@mroeschke
Copy link
Member

Thanks @dannyi96

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Mar 14, 2023
@dannyi96 dannyi96 deleted the numpy_warning_show branch March 14, 2023 03:19
mroeschke pushed a commit that referenced this pull request Mar 14, 2023
… show numpy warning) (#51958)

Backport PR #51917: Series.astype(np.integer) doesn't show numpy warning

Co-authored-by: Daniel Isaac <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Warnings Warnings that appear or should be added to pandas

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Series.astype(np.integer) doesn't show numpy warning

3 participants