Skip to content

Commit b717007

Browse files
committed
GH 30975-Fix for Series.append(DataFrame) Adding TypeError Testcase
1 parent d522438 commit b717007

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/series/methods/test_append.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ def test_append_dataframe(self):
7171

7272
tm.assert_series_equal(expected, result)
7373

74+
msg = "to_append should be a Series or list/tuple of Series, got " \
75+
"<class 'pandas.core.frame.DataFrame'>"
76+
with pytest.raises(TypeError, match=msg):
77+
df.A.append(df)
78+
7479
class TestSeriesAppendWithDatetimeIndex:
7580
def test_append(self):
7681
rng = date_range("5/8/2012 1:45", periods=10, freq="5T")

0 commit comments

Comments
 (0)