Skip to content

TST: Adding test to test_numeric, #37348 #44005

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

Merged
merged 6 commits into from
Oct 16, 2021

Conversation

gabrieldi95
Copy link
Contributor

This makes sure that comparing int to empty strings doesn't return an error.

@@ -37,3 +38,13 @@ def test_object_comparison_2d():
right.flags.writeable = False
result = comparison_op(left, right, operator.ne)
tm.assert_numpy_array_equal(result, ~expected)


def test_str_comparison():
Copy link
Member

Choose a reason for hiding this comment

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

this would go in tests.arithmetic.test_numeric

@gabrieldi95 gabrieldi95 changed the title TST: Adding test to array_ops, #37348 TST: Adding test to test_numeric, #37348 Oct 13, 2021
@jreback jreback added Index Related to the Index class or subclasses Testing pandas testing functions or related to the test suite Dtype Conversions Unexpected or buggy dtype conversions and removed Index Related to the Index class or subclasses labels Oct 13, 2021
@jreback jreback added this to the 1.4 milestone Oct 15, 2021

def test_empty_str_comparison():
# GH 37348
a = np.array(range(10 ** 5))
Copy link
Contributor

Choose a reason for hiding this comment

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

can you parametersize on n=1,2,5 (just to emulate the OP a bit)

@jreback jreback merged commit 5c3b640 into pandas-dev:master Oct 16, 2021
@jreback
Copy link
Contributor

jreback commented Oct 16, 2021

thanks @gabrieldi95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: comparison of int dataframe to string yield unpredictable error (ValueError: unknown type str128)
3 participants