Skip to content

Commit 5c3b640

Browse files
authored
TST: Adding test to test_numeric, #37348 (#44005)
1 parent ecee969 commit 5c3b640

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pandas/tests/arithmetic/test_numeric.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,3 +1429,16 @@ def test_sub_multiindex_swapped_levels():
14291429
result = df - df2
14301430
expected = pd.DataFrame([0.0] * 6, columns=["a"], index=df.index)
14311431
tm.assert_frame_equal(result, expected)
1432+
1433+
1434+
@pytest.mark.parametrize("power", [1, 2, 5])
1435+
@pytest.mark.parametrize("string_size", [0, 1, 2, 5])
1436+
def test_empty_str_comparison(power, string_size):
1437+
# GH 37348
1438+
a = np.array(range(10 ** power))
1439+
right = pd.DataFrame(a, dtype=np.int64)
1440+
left = " " * string_size
1441+
1442+
result = right == left
1443+
expected = pd.DataFrame(np.zeros(right.shape, dtype=bool))
1444+
tm.assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)