Skip to content

Commit 87b815b

Browse files
committed
Change test for 22721
1 parent bb91b3e commit 87b815b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pandas/tests/test_strings.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3088,7 +3088,11 @@ def test_str_accessor_no_new_attributes(self):
30883088
def test_method_on_bytes(self):
30893089
lhs = Series(np.array(list('abc'), 'S1').astype(object))
30903090
rhs = Series(np.array(list('def'), 'S1').astype(object))
3091+
if compat.PY3:
3092+
pytest.raises(TypeError, lhs.str.cat, rhs, sep=',')
3093+
else:
3094+
result = lhs.str.cat(rhs)
3095+
expected = Series(np.array(
3096+
['ad', 'be', 'cf'], 'S2').astype(object))
3097+
tm.assert_series_equal(result, expected)
30913098

3092-
result = lhs.str.cat(rhs)
3093-
expected = Series(np.array(['ad', 'be', 'cf'], 'S2').astype(object))
3094-
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)